Use Design Mode with User Control?

Discussion in 'ASP .Net' started by Steve - DND, Jun 26, 2003.

  1. Steve - DND

    Steve - DND Guest

    I have created a user control using the HTML view, and I now want to switch
    to Design mode so that it will automatically enter the controls used on the
    page in the code-behind, but the option to switch over is not available.
    Also, whenever I load up my controls, I get the message:

    "The file failed to load in the Web Form designer. Please correct the
    following error, then load it again: An exception occurred while trying to
    create an instance of <Control>. The exception was "Object reference not set
    to an instance of an object.".

    This is starting to get incredibly annoying, as it pops up this message
    everytime I open the control to make changes. What's the deal here guys?

    Thanks,
    Steve
    Steve - DND, Jun 26, 2003
    #1
    1. Advertising

  2. Hi,

    I think problem is with your ascx html syntax. Does your
    inherrit keyword in the page directive matches with the
    namespace mentioned in the codebehind?. If there is a mis
    match between the namespace this error can happen. Can you
    able to compile and run your code? Could you please sent
    your ascx code.

    regards
    Sreejumon[MVP]
    DOTNET makes IT happen
    >-----Original Message-----
    >I have created a user control using the HTML view, and I

    now want to switch
    >to Design mode so that it will automatically enter the

    controls used on the
    >page in the code-behind, but the option to switch over is

    not available.
    >Also, whenever I load up my controls, I get the message:
    >
    >"The file failed to load in the Web Form designer. Please

    correct the
    >following error, then load it again: An exception

    occurred while trying to
    >create an instance of <Control>. The exception

    was "Object reference not set
    >to an instance of an object.".
    >
    >This is starting to get incredibly annoying, as it pops

    up this message
    >everytime I open the control to make changes. What's the

    deal here guys?
    >
    >Thanks,
    >Steve
    >
    >
    >.
    >
    Sreejumon[MVP], Jun 27, 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.
Similar Threads
  1. John J Lee
    Replies:
    3
    Views:
    458
    bruno at modulix
    Dec 1, 2005
  2. Edward Loper
    Replies:
    0
    Views:
    448
    Edward Loper
    Aug 7, 2007
  3. John J Lee
    Replies:
    0
    Views:
    505
    John J Lee
    Aug 7, 2007
  4. Edward Loper

    mmm-mode, python-mode and doctest-mode?

    Edward Loper, Aug 9, 2007, in forum: Python
    Replies:
    0
    Views:
    417
    Edward Loper
    Aug 9, 2007
  5. Neal Becker
    Replies:
    0
    Views:
    370
    Neal Becker
    Aug 9, 2007
Loading...

Share This Page