Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable access MasterPage member

Status
Not open for further replies.

DotNetGnat

Programmer
Mar 10, 2005
5,548
0
0
IN
Guys,

I have this working in C# project but not in VB project...

in the MasterPage.master.vb file, I have
Code:
Public Overridable ReadOnly Property MainBody() As HtmlGenericControl
        Get
            Return Me.maintop
        End Get
    End Property

in the content page, I am trying to access using...
Code:
        Dim mybody As HtmlGenericControl
        mybody = Master.MainBody

but I am getting 'MainBody' is not a member of 'System.Web.UI.MasterPage'

Any suggestions...

-DNG
 
I just used FindControl and it worked fine for me...
also page inheritance is little complicated in VB.net project that I am currently working with...so thats the reason I was getting member not found error...

Thanks

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top