G
Guest
I'm quite new to ASP.NET so please forgive me if this is a silly question but
I'm completely stuck!
I'm trying to dynamically add a UserControl to a web form. My control is in
a file called Customers.ascx so I'm using:
Dim myControl as UserControl
myContol = LoadControl("Customers.ascx")
I then want to assign a value to the CustomerID property of the control but,
obviously, becasue the variable is of type UserControl there is no CustomerID
property.
What type should the myControl variable be? Or am I going about this
completely wrongly?
I'm using VB.NET in Visual Studio 2003, if that makes any difference.
Any help you can give would be greatly appreciated.
Alan
I'm completely stuck!
I'm trying to dynamically add a UserControl to a web form. My control is in
a file called Customers.ascx so I'm using:
Dim myControl as UserControl
myContol = LoadControl("Customers.ascx")
I then want to assign a value to the CustomerID property of the control but,
obviously, becasue the variable is of type UserControl there is no CustomerID
property.
What type should the myControl variable be? Or am I going about this
completely wrongly?
I'm using VB.NET in Visual Studio 2003, if that makes any difference.
Any help you can give would be greatly appreciated.
Alan