Access Content Page Controls from Master page in Asp.Net
Label cotentlbl = (Label)ContentPlaceHolder1.FindControl("lblContent");
TextBox contenttxt = (TextBox)ContentPlaceHolder1.FindControl("txtContent");
DropDownList contentddl = (DropDownListContentPlaceHolder1) .FindControl("ddlcontent");
masterpagelbl.Text = cotentlbl .Text;
masterpagetxt .Text = contenttxt .Text;
contentddl.SelectedIndex = 0;
No comments:
Post a Comment