DekGenius.com
[ Team LiB ] Previous Section Next Section

TagPrefixAttribute

System.Web.UI (system.web.dll)sealed class

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 sealed class TagPrefixAttribute : Attribute {
// Public Constructors
   public TagPrefixAttribute(string namespaceName, string tagPrefix);
// Public Instance Properties
   public string NamespaceName{get; }
   public string TagPrefix{get; }
}

Hierarchy

System.Object System.Attribute TagPrefixAttribute

Valid On

Assembly

    [ Team LiB ] Previous Section Next Section