S
shapper
Hello,
I have been trying to add a user control at runtime to a page:
Dim myUserControl As Control = LoadControl("MyUserControl.ascx")
The problem is this does not give me access to the user control
properties. So I tried the following:
Dim myUserControl As MyUserControl =
CType(LoadControl("MyUserControl.ascx"), MyUserControl)
However MyUserControl is not recognized.
How can solve this?
I looked everywhere and I can't find the solution.
Thanks,
Miguel
I have been trying to add a user control at runtime to a page:
Dim myUserControl As Control = LoadControl("MyUserControl.ascx")
The problem is this does not give me access to the user control
properties. So I tried the following:
Dim myUserControl As MyUserControl =
CType(LoadControl("MyUserControl.ascx"), MyUserControl)
However MyUserControl is not recognized.
How can solve this?
I looked everywhere and I can't find the solution.
Thanks,
Miguel