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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET