Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TagPrefixInfo Constructor
Collapse the table of content
Expand the table of content

TagPrefixInfo.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
)
public TagPrefixInfo (
	String tagPrefix, 
	String nameSpace, 
	String assembly, 
	String tagName, 
	String source
)
public function TagPrefixInfo (
	tagPrefix : String, 
	nameSpace : String, 
	assembly : String, 
	tagName : String, 
	source : String
)
Not applicable.

Parameters

tagPrefix

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

nameSpace

The namespace associated with the tag prefix.

assembly

The assembly where the namespace resides.

tagName

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

source

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.
pagesSection.Controls.Add(
    new System.Web.Configuration.TagPrefixInfo(
    "MyCtrl", "MyNameSpace", "MyAssembly", "MyControl",
    "MyControl.ascx"));

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft