[Mono-dev] UserControl type cast issue
slava at z.org.ua
Mon Mar 13 16:50:24 EST 2006
I have such a piece of code:
class MyControl : UserControl
class MyPage : Page
private void Page_Load(...)
MyControl control = ( MyControl ) LoadControl( "mycontrol.ascx" );
At line MyControl control = ( MyControl ) LoadControl( "mycontrol.ascx" );
I get an error "Cannot cast from source type to destination type"
I refered to MSDN - such a conversion is correct (they got a simulair
sample to the code above), any suggestion?
More information about the Mono-devel-list