Getting your controls to appear in Sharepoint Designer Toolbox

The guy over at has posted a v. handy little note about how to get your a servers control into the toolbox in Sharepoint Designer.

Apart from registering your control within the SafeControls part of the web.config), the secret sauce is to add :

[ToolboxData(“<{0}:ControlName runat=server />”)]

to your class (just above the class declaration)


[assembly: TagPrefix(“yournamespace”, “selected prefix”)]

What then happens when you drag the control into designer is that it inserts

<prefix:ControlName runat=server /> into the page.

Leave a Reply

Your email address will not be published. Required fields are marked *