I have a number of custom controls that I am trying to enable designer support for. The signature looks something like the following:
[ToolboxData("<{0}:MyDropDownList runat=\"server\" CustomProp="123"></{0}:MyDropDownList>")]
public class MyDropDownList: DropDownList
{
... code here
}
This works fine, but when I drag a control onto the page from the toolbox, the TagPrefix that gets added is "cc1":
<%@ Register Assembly="DBMClientPortal.Controls" Namespace="DBMClientPortal.Controls"
TagPrefix="cc1" %>
Obviously it is somewhat irrelevant what that TagPrefix is... it works as it stands, but I figured I must be able to change it somehow and curiosity got the better of me...
Anyone know how to define what the TagPrefix will be set to when dragging a custom control onto a page in visual studio?
Thanks, Max
It looks something like this:
[assembly:TagPrefix("MyControls","RequiredTextBox")]
and here's some more info about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With