load ascx and set properties

G

google

Hi,
[using asp.net 2.0 framework]
I'm using loadControl to load an ascx into a variable.
This works ok but I'm having to load the control into an Object
variable
e.g.
Dim aWidget As Object = Me.LoadControl("/assets/components/
Widget.ascx")

I'd like to be able to load it into a variable of the proper type so I
can set properties.

I'm pretty sure I could do this with the 1.1 framework simply by
changing the ascx class to public, but this doesn't work with 2.0

Many thanks,
 

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,815
Latest member
treekmostly22

Latest Threads

Top