TemplateControl.AppRelativeVirtualPath TemplateControl.AppRelativeVirtualPath TemplateControl.AppRelativeVirtualPath TemplateControl.AppRelativeVirtualPath Property

定義

取得或設定要在其中剖析和編譯控制項之檔案的應用程式相對虛擬目錄路徑。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; }
member this.AppRelativeVirtualPath : string with get, set
Public Property AppRelativeVirtualPath As String

屬性值

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

例外狀況

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

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

備註

當定義TemplateControl控制項的檔案位於處理要求之頁面以外的目錄中時, 請AppRelativeVirtualPath使用屬性來傳回的TemplateControl應用程式相對虛擬路徑。When 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.

屬性是根據AppRelativeVirtualPath屬性中設定的虛擬路徑來設定。 AppRelativeTemplateSourceDirectoryThe AppRelativeTemplateSourceDirectory property is set based on the virtual path that is set in the AppRelativeVirtualPath property.

適用於

另請參閱