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; }


System.Object System.Attribute TagPrefixAttribute

Valid On


    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace