I have an assembly that contains an ASP.NET control derived from
System.Web.UI.HtmlControls.HtmlGenericControl. I am trying to add this
control to my Controls Toolbox in VS.NET. When I select the assembly DLL
containing the control, it is not listed as a control to select. If I
derive the control from System.Web.UI.WebControls.WebControl, then it shows
up.
Is there some reason why HtmlControls cannot be added to the toolbox?

Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
Mikhail Arkhipov (Microsoft) - 31 Jul 2004 04:47 GMT
WebControl specifies certain design-time attributes, including data for the
VS toolbox. Apparently HtmlGenericControl does not. You have to specify them
manually in order to make your control interact with VS toolbox.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html
/servercontrols.asp
This article contains sample code which specifies toolbox data.
[DefaultProperty("DataTable"),
ToolboxData("<{0}:DataDropDownList
runat=server></{0}:DataDropDownList>")]
Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights.
On 7/26/04 6:26, in article eGietRxcEHA.384@TK2MSFTNGP10.phx.gbl, "Ken Varn"
<nospam> wrote:
> I have an assembly that contains an ASP.NET control derived from
> System.Web.UI.HtmlControls.HtmlGenericControl. I am trying to add this
[quoted text clipped - 4 lines]
>
> Is there some reason why HtmlControls cannot be added to the toolbox?