Custom control won't drag and drop to page

A

Andrea Williams

i'm a bit of a noob to custom controls, so please bare with me...

I just downloaded source to a control from thecodeproject.com but I'm unable
to drag and drop the control from my toolbox to the design mode of my ascx
file. According to the docs, I should be able to do just that. Is there
something special that I have to do to get a custom control to drag and drop
into my page? Some sort of setting or something that I haven't included in
the VS.NET option?

Thanks,
Andrea
 
A

Andrea Williams

I tried the first link and it is not drag and dropping either. So maybe I'm
adding it to the toolbar incorrectly? Are there an instructions to add
them?

Andrea
 
A

Andrea Williams

I just noticed that all the system control are in the GAC... Do I need to
add them to the GAC?

Andrea
 
B

Brock Allen

I wonder if the control is actually being added to the page, but it shows
no design time rendering. Check the underlying HTML for the control. It should
look something like <cc:YourControlName runat=server ... />
 
A

Andrea Williams

Nope, nothing is there. VS 2003 doesn't drop a thing. I can drag and drop
my User Web controls from my project into the page... And the control block
appears in that case.

So I'm adding the control to the toolbar by right-click the toolbar and
selecting "Add/ Remove Items..."
On the .Net Tab I browse, find the dll in the BIN/Debug folder and select it
and click OK. That puts the item on the toolbar. When the page is in
design mode, the control looks to be enabled. I click and drag it... When
the drag goes to the page (in design mode), the cursor changes from the bow
and pointer to a circle with a line through it (No sign). I drop it anyway
and nothing happens. No control in design mode and not text in HTML mode.

Andrea
 
R

recoil

Most of the time when this happens it is because your UserControl is
throwing an exception of some sort. There are a few occassions where
this will just "happen" and creating a new web page or a new project
usually solves it. In cases where it does not it is most likely because
somewhere along the line the UserControl is throwing an exception. Most
obvious things to look for are code references that might fail at
runtiome because things like Server is null (thus a call to
Server.MapPath in OnInit or in the constructor or OnRender would fail)
 
A

Andrea Williams

ok, I created a new project and it is dropping into the new project. I
tried adding a new page to my old project and it still was not working. My
page layout is defualted to Flow instead of Grid, would that have anything
to do with this issue? The new defualted to grid.

So, assuming there's a problem with my project that makes the drop fail,
what could it be? Where should I start looking? Or is it a bug in VS.net?

Andrea
 

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,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top