B
brett
I have a user control with a namespace similar to:
mysite.SomeApp.TheControl
In an aspx page, I'd like to load the above control based on its
filename. The page is in the same namespace, mysite.SomeApp and both
can see each other through intellisense. Session["NavControl"]
contains the text "TheControl.ascx". When I try to execute this code
in the aspx page
Control someControl = LoadControl(Session["NavControl"].ToString());
I get this exception
(8): error CS0117: 'ASP.SomeApp_TheControl_ascx' does not contain a
definition for 'mysite'
Any ideas what this means?
I have an imagebutton on the aspx page. When it is clicked, it simply
rotates two controls. So, on the first click, display controlA; on
the second click, display controlB; third click, controlA and so on.
Is there a better way?
Thanks,
Brett
mysite.SomeApp.TheControl
In an aspx page, I'd like to load the above control based on its
filename. The page is in the same namespace, mysite.SomeApp and both
can see each other through intellisense. Session["NavControl"]
contains the text "TheControl.ascx". When I try to execute this code
in the aspx page
Control someControl = LoadControl(Session["NavControl"].ToString());
I get this exception
(8): error CS0117: 'ASP.SomeApp_TheControl_ascx' does not contain a
definition for 'mysite'
Any ideas what this means?
I have an imagebutton on the aspx page. When it is clicked, it simply
rotates two controls. So, on the first click, display controlA; on
the second click, display controlB; third click, controlA and so on.
Is there a better way?
Thanks,
Brett