Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > load ascx and set properties

Reply
Thread Tools

load ascx and set properties

 
 
google@ratemyband.co.uk
Guest
Posts: n/a
 
      07-20-2007
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,

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
load ascx and set properties google@ratemyband.co.uk ASP .Net 5 07-20-2007 06:26 PM
Could not load type after copy/paste .ascx files into a directory set as application in IIS Bogosian ASP .Net 5 01-07-2004 03:17 PM
can a dg be added to an ascx? ascx call a ws? Jason Shohet ASP .Net 1 11-10-2003 07:08 PM
.ascx UserControl Properties are set after Page_Load only on PostBacks Douglas J. Badin ASP .Net Building Controls 3 10-14-2003 01:50 PM
[ASCX] Add an ascx in a webcontrol... Quentin ASP .Net 1 07-29-2003 07:37 PM



Advertisments