Control no longer "draggable and droppable"

  • Thread starter Scott Mitchell [MVP]
  • Start date
S

Scott Mitchell [MVP]

(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
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 

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,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top