Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TagPrefixInfo Constructor

Initializes a new instance of the TagPrefixInfo class using the passed values.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)
public TagPrefixInfo(
	string tagPrefix,
	string nameSpace,
	string assembly,
	string tagName,
	string source


Type: System.String

The tag prefix being mapped to a source file or namespace and assembly.

Type: System.String

The namespace associated with the tag prefix.

Type: System.String

The assembly where the namespace resides.

Type: System.String

The name of the control to be used in the page.

Type: System.String

The name of the file that contains the user control.

This constructor creates an instance of the TagPrefixInfo class and initializes it using the passed parameters. The parameters for which you specify values depend on the kind of control you refer to with the specified tag prefix. Parameters not required for that tag prefix should be left blank. (Use an empty string.)

  • If the control is a user control, you must specify values for the tagPrefix, tagName, and source parameters.

  • If the control is a custom control, you must specify values for the tagPrefix and nameSpace parameters. If the control is not in the application code directory, you must also specify the assembly parameter.

The following code example shows how to use the TagPrefixInfo constructor. This code example is part of a larger example provided for the PagesSection class.

// Add a TagPrefixInfo object using a constructor.
    new System.Web.Configuration.TagPrefixInfo(
    "MyCtrl", "MyNameSpace", "MyAssembly", "MyControl",

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.