Master Page Controls can be accessed from Content pages using 'Master' keyword
Example: Suppose a label with id 'Label1' is in the master page.Then a reference to this control can be used in any content page.Now.I am trying to write down the text value of that label in content page like this:
Label mylabel=(Label)Master.FindControl("Label1");
Response.Write(mylabel.text);
No comments:
Post a Comment