Editar

Compartilhar via


TagPrefixInfo(String, String, String, String, String) Constructor

Definition

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

public:
 TagPrefixInfo(System::String ^ tagPrefix, System::String ^ nameSpace, System::String ^ assembly, System::String ^ tagName, System::String ^ source);
public TagPrefixInfo (string tagPrefix, string nameSpace, string assembly, string tagName, string source);
new System.Web.Configuration.TagPrefixInfo : string * string * string * string * string -> System.Web.Configuration.TagPrefixInfo
Public Sub New (tagPrefix As String, nameSpace As String, assembly As String, tagName As String, source As String)

Parameters

tagPrefix
String

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

nameSpace
String

The namespace associated with the tag prefix.

assembly
String

The assembly where the namespace resides.

tagName
String

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

source
String

The name of the file that contains the user control.

Examples

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"));
' Add a TagPrefixInfo object using a constructor.
pagesSection.Controls.Add( _
 New System.Web.Configuration.TagPrefixInfo( _
 "MyCtrl", "MyNameSpace", "MyAssembly", "MyControl", _
 "MyControl.ascx"))

Remarks

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.

Applies to

See also