ScriptManager.ScriptPath 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This property is obsolete. Set the Path property on each individual ScriptReference instead.
取得或設定位置的根路徑,該路徑可用於建置 ASP.NET Ajax 和自訂指令碼檔的路徑。
public:
property System::String ^ ScriptPath { System::String ^ get(); void set(System::String ^ value); };
public string ScriptPath { get; set; }
[System.Obsolete("This property is obsolete. Set the Path property on each individual ScriptReference instead.")]
public string ScriptPath { get; set; }
member this.ScriptPath : string with get, set
[<System.Obsolete("This property is obsolete. Set the Path property on each individual ScriptReference instead.")>]
member this.ScriptPath : string with get, set
Public Property ScriptPath As String
屬性值
儲存指令碼檔的位置。 預設值為空字串 (""),可解譯為相對路徑。
- 屬性
備註
屬性 ScriptPath 可讓您指定頁面上所有腳本區塊的絕對、相對或應用程式相對 URL。 這包括向目前 ScriptManager 實例註冊的自訂和協力廠商腳本區塊。 屬性 ScriptPath 通常會以宣告方式設定為頁面上元素的屬性 ScriptManager ,但也可以在程式碼中設定。
path如果為集合中的 Scripts 物件設定 ScriptReference 屬性或 Path 屬性,路徑值會 ScriptPath 覆寫該 ScriptReference 實例的值。
如果未指定任何 Path 值,控制項會 ScriptManager 搜尋 屬性所 ScriptPath 定義的目錄,並依 其 Name 或 Assembly 屬性解析腳本參考。