PagesSection.TagMapping Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of TagMapInfo objects.
public:
property System::Web::Configuration::TagMapCollection ^ TagMapping { System::Web::Configuration::TagMapCollection ^ get(); };
[System.Configuration.ConfigurationProperty("tagMapping")]
public System.Web.Configuration.TagMapCollection TagMapping { get; }
[<System.Configuration.ConfigurationProperty("tagMapping")>]
member this.TagMapping : System.Web.Configuration.TagMapCollection
Public ReadOnly Property TagMapping As TagMapCollection
Property Value
A TagMapCollection of TagMapInfo objects.
- Attributes
Examples
The following code example shows how to use the TagMapping property.
// Get all current TagMappings in the collection.
for (int i = 0; i < pagesSection.TagMapping.Count; i++)
{
Console.WriteLine("TagMapping {0}:", i);
Console.WriteLine(" TagTypeName = '{0}'",
pagesSection.TagMapping[i].TagType);
Console.WriteLine(" MappedTagTypeName = '{0}'",
pagesSection.TagMapping[i].MappedTagType);
}
// Add a TagMapInfo object using a constructor.
pagesSection.TagMapping.Add(
new System.Web.Configuration.TagMapInfo(
"MyNameSpace.MyControl", "MyNameSpace.MyOtherControl"));
' Get all current TagMappings in the collection.
Dim k As Int32
For k = 1 To pagesSection.TagMapping.Count
Console.WriteLine("TagMapping {0}:", i)
Console.WriteLine(" TagTypeName = '{0}'", _
pagesSection.TagMapping(k).TagType)
Console.WriteLine(" MappedTagTypeName = '{0}'", _
pagesSection.TagMapping(k).MappedTagType)
Next
' Add a TagMapInfo object using a constructor.
pagesSection.TagMapping.Add( _
New System.Web.Configuration.TagMapInfo( _
"MyNameSpace.MyControl", "MyNameSpace.MyOtherControl"))
Remarks
The TagPrefixInfo object has no corresponding directive on an ASP.NET page. The TagPrefixInfo objects allow you to remap tag type names to other type names at compile time.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.