Click here to Skip to main content
15,917,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to find the controls in an aspx page "Default.aspx" which is kept in a master page "Master2.master". The Master2.master page is kept inside another master page "Master1.master" how can i get the controls in Default.aspx page through code Do any body have any idea how to implement that?
Posted
Comments
senguptaamlan 14-Dec-10 7:46am    
what you have done and whats the problem that you are facing ?

You can use the Page.Master property, like this:

TextBox TextBox1 = Page.Master.Controls.FindControl("TextBox1");

See to: How to: Reference ASP.NET Master Page Content

I hope it is useful.
------------------------------------------------------------------
Signature: Casas a venda em Suzano
 
Share this answer
 
v2
Try This,
Master.Master.FindControl("controlId")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900