Dymanic usercontrols

J

Johnny Emde Jensen

Hello

USING VB.NET

In VS 2003 I did this to dynamically add a webusercontrol
Private objControl as MyWebControl = nothing

Private Sub ShowControl()
objControl = CType(Page.LoadControl("MyWebControl.ascx"), MyWebControl
Container.Controls.Add(objControl)
...
...
End Sub

In VS 2005 I'm not even able to declare the var objComtrol as
MyWebControl???
HowTo do this??

Kind Regards
Johnny E Jensen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top