When we write a custom control, like example:
[assembly: TagPrefix("Pro.UI", "pro")]
public class ProTextBox : TextBox
{
...
}
On the HTML coding, we are obliged to reference the control as follows:
<pro:ProTextBox runat="server" ... etc.
My question is:
Is there way to reference the control in the HTML eliminating the prefix “Pro” as follows:
<pro:TextBox runat="server" ... etc.
Best regards.
You would have to name the
classfor the custom control to whatever you want the name to be when going to use it in a page.Note:
I used the fully qualified
namespacewhen deriving fromTextBoxto avoid conflictsDo something like this:
Then: