The file failed to load in the Web Form designer ... Unable to cast object of type myServicedCompone

H

Henry

I have a user control that inherits from a base user control class. I can
view and edit the base user control in the designer. However, my child user
control fails to load in the web form designer. The error looks like this:

The file failed to load in the Web Form designer. Please correct the
following error, then load it again: An exception occured while trying to
create an instance of baseUserControl. The exception was "Unable to cast
object of type myServicedComponentClass to type myServicedComponentClass. "
..

I get no build errors, and my webforms with all their user controls function
properly when browsed.
 
H

Henry

Nevermind, i fixed it. In my 'baseUserControl' i moved the
'myServicedComponentClass' from being a class member to within a function.
VS.Net can now modify all the child classes in the designer.
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top