C
Chris
Scenario:
I make a custom control, inheriting from
System.Web.UI.HtmlControls.HtmlControl as follows:
public class MyControl : System.Web.UI.HtmlControls.HtmlControl
{
// ...
}
When I attempt to place it in my toolbox in VS, I get the message that
there are no components in my assembly that can be placed on the
toolbox. When I make a simple change to inherit from
System.Web.UI.WebControls.WebControl, I can add the control without a
problem, as follows:
public class MyControl : System.Web.UI.WebControls.WebControl
{
// ...
}
This control does not need to incur the overhead of a WebControl, so
I'd like to make it a "simpler" HtmlControl. Am I missing something?
Can I not use a HtmlControl in the VS.NET toolbox? Is this the wrong
control from which to inherit?
I make a custom control, inheriting from
System.Web.UI.HtmlControls.HtmlControl as follows:
public class MyControl : System.Web.UI.HtmlControls.HtmlControl
{
// ...
}
When I attempt to place it in my toolbox in VS, I get the message that
there are no components in my assembly that can be placed on the
toolbox. When I make a simple change to inherit from
System.Web.UI.WebControls.WebControl, I can add the control without a
problem, as follows:
public class MyControl : System.Web.UI.WebControls.WebControl
{
// ...
}
This control does not need to incur the overhead of a WebControl, so
I'd like to make it a "simpler" HtmlControl. Am I missing something?
Can I not use a HtmlControl in the VS.NET toolbox? Is this the wrong
control from which to inherit?