语言

UrlMapping.MappedUrl 属性

定义

Web 应用程序中的 URL。

public:
 property System::String ^ MappedUrl { System::String ^ get(); };
[System.Configuration.ConfigurationProperty("mappedUrl", IsRequired=true)]
public string MappedUrl { get; }
[<System.Configuration.ConfigurationProperty("mappedUrl", IsRequired=true)>]
member this.MappedUrl : string
Public ReadOnly Property MappedUrl As String

属性值

Web 应用程序中已映射到属性指定的 Url 值的 URL。

属性

示例

下面的代码示例演示如何获取 MappedUrl 属性。 此示例来自类的 UrlMapping 较大示例。

urlMap = (UrlMapping)urlMapSection.UrlMappings[showVal - 1];
realURL.Text = urlMap.MappedUrl;
urlMap = CType(urlMapSection.UrlMappings(showVal - 1), UrlMapping)
realURL.Text = urlMap.MappedUrl

注解

该MappedUrl属性是配置文件节中mappedUrl元素的属性的add编程等效项urlMappings。

注释

使用 IIS 5.0 时,如果使用 MappedUrl 属性从受支持的页面类型(如.aspx文件)映射到不支持的页面类型(如.asp页),将发生错误。 IIS 版本 6.0 支持这种类型的映射。

适用于

另请参阅