PagesSection.TagMapping Property


Gets a collection of TagMapInfo objects.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

Public ReadOnly Property TagMapping As TagMapCollection

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.

The following code example shows how to use the TagMapping property.

' 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}'", _
  Console.WriteLine("  MappedTagTypeName = '{0}'", _

' Add a TagMapInfo object using a constructor.
pagesSection.TagMapping.Add( _
 New System.Web.Configuration.TagMapInfo( _
 "MyNameSpace.MyControl", "MyNameSpace.MyOtherControl"))

.NET Framework
Available since 2.0
Return to top