How to drag a UserControl into the Toolbox?

7k Views Asked by At

i have an ASP.net UserControl that i want to use:

enter image description here

Following the instructions in Visual Studio:

There are no usable controls in this group.
Drag an item onto this text to add it to the toolbox.

i try dragging the item onto that text to add it to the toolbox:

enter image description here

Unfortunately, dragging an item onto that text does not add it to the toolbox:

enter image description here

So that raises the question:

How do i drag a UserControl into the Toolbox?

Note

  • building, or rebuilding, does not automatically add the control to the toolbox
  • the Choose Items dialog does not include user controls
3

There are 3 best solutions below

0
On BEST ANSWER

You don't. Just drag the UserControl from the solution explorer onto the design surface. No need to add it into the toolbox first.

Here is a relevant article in the asp.net forum.

3
On
0
On

You cannot do with UserControls. But using ASP.NET ServerControls you can achive it.
Go through this article.
http://devoptions.blogspot.com/2015/02/create-aspnet-server-controls-from.html