Control.AppRelativeTemplateSourceDirectory Control.AppRelativeTemplateSourceDirectory Control.AppRelativeTemplateSourceDirectory Control.AppRelativeTemplateSourceDirectory Property

定義

取得或設定包含了此控制項之 PageUserControl 物件的相對應用程式虛擬目錄。Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.

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

屬性值

包含此控制項之網頁或使用者控制項的相對應用程式虛擬目錄。The application-relative virtual directory of the page or user control that contains this control.

備註

AppRelativeTemplateSourceDirectory屬性包含頁面或使用者控制項的應用程式相對路徑,其中包含目前的控制項。The AppRelativeTemplateSourceDirectory property contains the application-relative path to the page or user control that contains the current control. 例如,如果網頁位於http://www.contoso.com/application/subdirectory,則AppRelativeTemplateSourceDirectory屬性會傳回 "~/subdirectory"。For example, if the Web page resides at http://www.contoso.com/application/subdirectory, the AppRelativeTemplateSourceDirectory property returns "~/subdirectory".

若要傳回虛擬路徑("application/子目錄"),請使用TemplateSourceDirectory屬性。To return the virtual path ("application/subdirectory"), use the TemplateSourceDirectory property.

適用於