Name
TagPrefixAttribute
Synopsis
Tag prefixes are used to identify control elements in an
.aspx
file. For example, all pre-built ASP.NET controls
have a tag prefix of asp:
, as in <asp:Label />
. You can use the TagPrefixAttribute
for your custom controls to
define a different tag, which can help you distinguish your controls easily. The
portion of the tag after the tag prefix is the control class name. Alternatively,
you can use the <Register>
directive in the .aspx
file (not the code-behind file).
Public NotInheritable Class TagPrefixAttribute : Inherits Attribute ' Public Constructors Public Sub New(ByVal namespaceName As String, ByVal tagPrefix As String) ' Public Instance Properties Public ReadOnly Property NamespaceName As String Public ReadOnly Property TagPrefix As String End Class
Hierarchy
System.Object→System.Attribute→ TagPrefixAttribute
Valid On
Assembly
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.