Author: swaino | Posted on: 10/20/2009 4:08:10 AM | Views : 281

Hi,
I want to cast a usercontrol to another class.
The usercontrol inherits from a base control class.
The user control is then loaded using LoadControl, but depending on the type of user control, I want to perform different functions.
However I've tried doing:
dim uc as New BaseUserControl

uc = LoadControl(....)
This works ok.



then...
dim uc as New SpecificUserControl
uc = CType(uc, SpecificUserControl)
However SpecificUserControl is not defined.  However I have added this to the ClassName directive inside the user control markup.
How do I get access to the user control class in question?



...

Go to the complete details ...