TemplateControl.AppRelativeVirtualPath 屬性

定義

取得或設定要在其中剖析和編譯控制項之檔案的應用程式相對虛擬目錄路徑。Gets or sets the application-relative, virtual directory path to the file from which the control is parsed and compiled.

public:
 property System::String ^ AppRelativeVirtualPath { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public string AppRelativeVirtualPath { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.AppRelativeVirtualPath : string with get, set
Public Property AppRelativeVirtualPath As String

屬性值

String

表示路徑的字串。A string representing the path.

屬性

例外狀況

設定的路徑為 nullThe path that is set is null.

設定的路徑不是根目錄。The path that is set is not rooted.

備註

當定義控制項的檔案 TemplateControl 位於處理要求的頁面以外的目錄時,請使用屬性傳回的 AppRelativeVirtualPath 應用程式相對虛擬路徑 TemplateControlWhen the file that defines a TemplateControl control resides in a directory other than that of the page processing the request, use the AppRelativeVirtualPath property to return the application-relative, virtual path to the TemplateControl.

AppRelativeTemplateSourceDirectory屬性會根據屬性中設定的虛擬路徑進行設定 AppRelativeVirtualPathThe AppRelativeTemplateSourceDirectory property is set based on the virtual path that is set in the AppRelativeVirtualPath property.

適用於

另請參閱