共用方式為


AbsoluteFilePath 屬性

取得同一網頁的根 URL。

public string AbsoluteFilePath {
   get
}

備註

根 URL 與伺服器是絕對的,但它不含通訊協定前置詞或伺服器名稱,因此不是完整的 URL。

範例

下列範例示範如何使用 AbsolutePath 屬性擷取行動網頁的絕對路徑資訊。

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 

     'Returns the full path from virtual directory Label1.Text =       
      Label1.MobilePage.AbsoluteFilePath 

End Sub

[C#]
private void Page_Load(object sender, System.EventArgs e)
{
   //Returns the full path from virual directory.
   Label1.Text = Label1.MobilePage.AbsoluteFilePath;
} 

請參閱

套用至:MobilePage 類別