This is a migrated thread and some comments may be shown as answers.

Compile a Web User Control and show it in the Toolbox of Visual Studio

1 Answer 57 Views
Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Andrew Chandler
Top achievements
Rank 2
Andrew Chandler asked on 06 Apr 2011, 12:02 AM
I have read multiple articles on compiling a Web User Control into an assembly to be used by other applications.  I have done this part and it works fine using the Web Deployment Project add-in. 

When this assembly containing the web user controls are included in a web project,  they do not show up in the Toolbox of visual studio.  I understand that this is probably an issue of them being  System.Web.UI.UserControl.  However, I am placing the question here, How can I get this control to show up in the Toolbox? 

Since Telerik builds server control suites and the developers here are quite good, someone has got to know what class, interface, attributes, will turn this functionality on.  I tried the ToolboxData attribute, but  that doesn't change anything.  I have gone through the Apress server controls pro dev books and scourered online.  Help anyone?

1 Answer, 1 is accepted

Sort by
0
Andrew Chandler
Top achievements
Rank 2
answered on 06 Apr 2011, 12:32 AM
I got the compiled user control to show up in the toolbox by applying the ToolboxItem(true) attribute, but it still will not let me drag it onto the design surface.  It will let me drag onto the code window, but will not add anything.  So that is as far as I got so far.  I have added the attributes ToolboxData and ToolboxItem. 

By showing up, i mean that when I go to the General tab of the Toolbox and right click and choose Item... I browse to the .dll and the classes show up in the list.  They still do not automatically show up when adding a reference to this assembly and recompiling the application.
Tags
Visual Style Builder
Asked by
Andrew Chandler
Top achievements
Rank 2
Answers by
Andrew Chandler
Top achievements
Rank 2
Share this question
or