Control no longer "draggable and droppable"

Discussion in 'ASP .Net Building Controls' started by Scott Mitchell [MVP], Nov 29, 2004.

  1. (FYI, this question is cross-posted over the ASP.NET Forums -
    http://asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=759339)

    I have created a custom control that, previously, had a great design
    time experience. I don't know what happened, but after Thanksgiving I
    returned to this project and now when I try to drag and drop the custom
    control from the Toolbox onto an ASP.NET page, nothing appears. No
    @Register directive is added, no markup is added to the .aspx page, nothing.

    The custom control has a Designer class, so I set some breakpoints in
    that page, and debugged on this project. What I found was that when
    dragging and dropping the control onto a page, the Designer's overridden
    Initialize() method ran, but the GetDesignTimeHtml() override does not
    get called at all. However, if I take a page that already has this
    control added, both Initialize() and GetDesignTimeHtml() are called, and
    the control is displayed properly in the Design tab.

    Furthermore, if I manually add the @Register directive and the custom
    control's declarative syntax in the HTML tab and switch back to the
    Design tab, everything works as it's supposed to. The problem, it seems,
    is in dragging and dropping the control, something that worked
    previously. No changes had been made to the Designer code or custom
    control code. I even tried manually removing the controls from the
    Toolbox, restarting VS.NET, and readding them, but still no dice.

    Has anyone else encountered a similar problem and, if so, what did you
    do to alleve it?

    Thanks.

    --

    Scott Mitchell

    http://www.4GuysFromRolla.com

    * When you think ASP.NET, think 4GuysFromRolla.com!
    Scott Mitchell [MVP], Nov 29, 2004
    #1
    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. GO
    Replies:
    4
    Views:
    503
  2. Kathy Burke
    Replies:
    1
    Views:
    1,016
    Vidar Petursson
    Jul 18, 2003
  3. Carramba
    Replies:
    18
    Views:
    447
    Mark McIntyre
    Feb 15, 2005
  4. =?Utf-8?B?Smlt?=
    Replies:
    2
    Views:
    596
    =?Utf-8?B?Smlt?=
    Aug 20, 2007
  5. Roy
    Replies:
    1
    Views:
    179
    Rob Teegarden
    Jan 12, 2005
Loading...

Share This Page