|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MasterPage, UserControl and WebformThe layout of my site is as follows:
I've a MasterPage that contains a UserControl and attached to the MasterPage is webforms that contain the sites content. My porblem is how to access the UserControl on the MasterPage from within the Web Forms. I can access it no problem from the MasterPage as its available from intellisense. Oh, and i'm using C# Thanks in advance, Steve. Hi,
with Master.FindControl("UCControl1") where UCControl1 is the id of the UC. This way yo can get rerefence to the user control. Another option is op create a readonly property on the Master which exposes the UC . Then on content page, specify @MasterType directive whichs strongly-types Master property on content page (e.g on content page Master.PropertyName gives access to the UC you expose) You'll see concrete example of it at: http://forums.asp.net/thread/1168780.aspx Show quoteHide quote "kirkski" <stevekir***@hotmail.com> wrote in message news:1178958025.771272.67850@o5g2000hsb.googlegroups.com... > The layout of my site is as follows: > > I've a MasterPage that contains a UserControl and attached to the > MasterPage is webforms that contain the sites content. > > My porblem is how to access the UserControl on the MasterPage from > within the Web Forms. I can access it no problem from the MasterPage > as its available from intellisense. Oh, and i'm using C# > > Thanks in advance, > > Steve. >
Event not firing. User control with a repeater that contains a bu
Visual Studio isn't generating the Code Gen file (*.designer.vb) Treeview node target Horizontal Menus & SiteMaps Multiple User Controls Menu on User Control _I_don’t_show_the_header? <select> <option> an element in DOM ? gridview rowdatabound change cssclass and selectedrowstyle cssclass help opening a window from another form |
|||||||||||||||||||||||