Control/Page accessing each other

Hi All,

I've just tried upgrading a VB.NET 2003 project to VB.NET 2005 and I have heaps of errors.  One specific one I wanted to narrow down on was when a user control is placed on a web form.  Say for example the webform has a public function on it and that in the PageLoad of the ascx, the control wants to access the function that is on the page it sits on.  In order to do this in the existing framework/vs I used something like:

_Groups = CType(Me.Page, CommissionsPage).GetGroups()

where CommissionsPage is the WebForm.

Now when I do this in VB.NET VS 2005 i get the error:

CommissionsPage is not defined.

In the CommissionsPage WebForm I have tag linking to the ascx User Control as follows: 

<%
@ Register TagPrefix="uc1" TagName="UserControl" Src="UserControl.ascx" %>


My question is, how do I do the equivalent thing in VS 2005 and VB.NET

It'd be great if anyone knows and could enlighten me.

Thanks,
Jesse



Answer this question

Control/Page accessing each other

  • albator69

    Hi,

    Please post questions related to ASP.NET in the forums here:

    http://forums.asp.net

    Regards,

    Vikram

     



  • Control/Page accessing each other