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

Discussion in 'ASP .Net Building Controls' started by Henry, Oct 20, 2003.

  1. Henry

    Henry Guest

    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.
    Henry, Oct 20, 2003
    #1
    1. Advertising

  2. Henry

    Henry Guest

    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.

    "Henry" <> wrote in message
    news:EETkb.12538$...
    > 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.
    >
    >
    Henry, Oct 20, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page