Hi all,
I have an aspx page (main.aspx), which contains a user control menu.ascx, which in turn contains another user control poll.ascx.
The code behind for the poll.ascx file works fine to a point. I want to call a function in this file depending on which of two buttons has fired the postback. My form is on the main.aspx page. In the code for the main.aspx file, I want to determine the button which caused the postback (not the problem here) and then call a function in the poll.ascx code behind file.
I am trying to do something like this:
The class name of the menu user control is menuControl.
In the code behind of the menuControl I simply have a reference to the poll.ascx class.
I keep getting the following error in the main.aspx file:
Any ideas?
I have an aspx page (main.aspx), which contains a user control menu.ascx, which in turn contains another user control poll.ascx.
The code behind for the poll.ascx file works fine to a point. I want to call a function in this file depending on which of two buttons has fired the postback. My form is on the main.aspx page. In the code for the main.aspx file, I want to determine the button which caused the postback (not the problem here) and then call a function in the poll.ascx code behind file.
I am trying to do something like this:
Code:
Protected WithEvents menuctrl as menuControl
...
menuctrl.poll.button1click()
The class name of the menu user control is menuControl.
In the code behind of the menuControl I simply have a reference to the poll.ascx class.
I keep getting the following error in the main.aspx file:
Code:
Type 'menuControl' is not defined.
Any ideas?