TagPrefixAttribute

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



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net