PagesSection.TagMapping Property


Gets a collection of TagMapInfo objects.

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

public TagMapCollection TagMapping { get; }

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.
for (int i = 0; i < pagesSection.TagMapping.Count; i++)
  Console.WriteLine("TagMapping {0}:", i);
  Console.WriteLine("  TagTypeName = '{0}'",
  Console.WriteLine("  MappedTagTypeName = '{0}'",

// Add a TagMapInfo object using a constructor.
    new System.Web.Configuration.TagMapInfo(
    "MyNameSpace.MyControl", "MyNameSpace.MyOtherControl"));

.NET Framework
Available since 2.0
Return to top