I'm trying to access menus I placed on a master page. based on user levels I want to show which menu belongs to which level.
On my home page I have the following on the load event.
Dim InqMenu As System.Web.UI.WebControls.Menu = CType(myMaster.FindControl("MenuControl1"), Menu)
InqMenu.Visible = True
I just trying to test with this to display the menu that I set the visible to False.
I get an error saying "unable to cast of type ASP.menucontrol_ascx' to type 'System.Web.UI.Wecontrols.Menu'
I am currently accessing lables on my master page with no problem.
Any help would be appreciated.
Thanks
On my home page I have the following on the load event.
Dim InqMenu As System.Web.UI.WebControls.Menu = CType(myMaster.FindControl("MenuControl1"), Menu)
InqMenu.Visible = True
I just trying to test with this to display the menu that I set the visible to False.
I get an error saying "unable to cast of type ASP.menucontrol_ascx' to type 'System.Web.UI.Wecontrols.Menu'
I am currently accessing lables on my master page with no problem.
Any help would be appreciated.
Thanks