Accessing MasterPage controls from pages that implement the Master Page.
Assume textBox1 is a control of type TextBox located on the master page, you would genrate a control of similar control type in the page that implements the masterpage, then find the control and cast to the new control that you just created.
TextBox txt1 = (TextBox) Master.FindControl("textBox1");
txt1.Text = "Test";
You can even access the controls events see below link
http://fredrik.nsquared2.com/viewpost.aspx?postid=328
No comments:
Post a Comment