How do you access individual items of an Master Page
Answer Posted / m.ramasubbareddy
There are so many ways to access individual items of an
Master Page
you need to typecast what control you need to find
1.TextBox textbox=(TextBox)this.findcontrol("textbox1");
2.Label labl=(Label)page.parent.fincotrol("lblname") as Label;
3.ContentPlaceholder
cph=(ContentPlaceholder)this.findcontrol("ContentPlaceholder1"
);
Label lbl=(Label)cph.findcontrol("lblname");
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the different method of navigation in asp.net?
How can we communicate with each server in N-tier Architecture? and what are the methods?
Describe state management in asp.net?
Explain the difference between Repeater and Data list control in ASP.NET?
What asp.net control can embed xaml into asp.net pages?
What is xaml? Are xaml file compiled or built on runtime?
Explain the difference between server.transfer and response.redirect? Why would I choose one over the other?
What are the namespaces used in asp.net mvc? : asp.net mvc
What are main return types supported in Web API?
Why asp.net mvc is better than asp.net? : Asp.Net MVC
How dataadapter.fill works?
How does session work?
What is difference between View State and Hidden Field in ASP.NET?
How can I have a particular web page in an asp.net application which displays its own error page?
Define application state variable and session state variable?