共用方式為


UrlMapping.MappedUrl 屬性

定義

你網頁應用程式中的一個網址。

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

屬性值

你網頁應用程式中已映射到屬性指定的 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 屬性是設定檔中元素屬性的程式化等價 mappedUrladdurlMappings 物。

備註

使用 IIS 5.0 時,若使用 MappedUrl 該特性將支援頁面類型(如 .aspx 檔案)映射到不支援頁面類型(如 .asp 頁面),將會發生錯誤。 這種類型的映射在 IIS 6.0 版本中得到支援。

適用於

另請參閱