write this code inside child page of masterpage to access a control.
Label lblmsg;
lblmsg = (Label)Master.FindControl("lblTitle");
lblmsg.Text = "I love my india";
//----------------------------------
((EmpMasterPage)this.Master).SetMessage("I love my India");
here EmpMasterPage is a name of MasterPage and SetMessage is a method of that MasterPage.
here EmpMasterPage is a name of MasterPage and SetMessage is a method of that MasterPage.
No comments:
Post a Comment