System.Web.UI.TagPrefixAttribute Class

Defines the tag prefix used in a Web page to identify custom controls. This class cannot be inherited.

See Also: TagPrefixAttribute Members


[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]
public sealed class TagPrefixAttribute : Attribute


The System.Web.UI.TagPrefixAttribute class defines an assembly-level attribute needed to specify tag prefix aliases for custom controls. This attribute is used by tools such as Microsoft Visual Studio to automatically generate a Register directive in the ASP.NET page where the custom controls are used.

This directive registers the tag prefix with a namespace. Moreover, it specifies the assembly where the custom control code implementation resides. With this directive in place, you can use custom controls in a Web page declaratively.

For more information about using attributes, see Extending Metadata Using Attributes.


Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,