code_junkie

How to access a user control in a masterpage from a content page?

Nov 13th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Dim myMaster as MyMasterPage = CType(Page.Master, MyMasterPage)
  2. myMaster.MyUserControl.Text = "Hello!"
  3.  
  4. UserControl uch = Page.Master.FindControl("ucHeader1") as UserControl;
  5. PlaceHolder phProxylist= ucHeader1.FindControl("phProxy") as PlaceHolder;
  6. DropDownList ddlproxylist1 = ucHeader1.FindControl("ddlProxyList") as DropDownList;
  7. phProxylist.Visible = false;
Add Comment
Please, Sign In to add comment