IScriptControl.GetScriptReferences IScriptControl.GetScriptReferences IScriptControl.GetScriptReferences IScriptControl.GetScriptReferences Method

定義

取得定義控制項需要之指令碼資源的 ScriptReference 物件集合。Gets a collection of ScriptReference objects that define script resources that the control requires.

public:
 System::Collections::Generic::IEnumerable<System::Web::UI::ScriptReference ^> ^ GetScriptReferences();
public System.Collections.Generic.IEnumerable<System.Web.UI.ScriptReference> GetScriptReferences ();
abstract member GetScriptReferences : unit -> seq<System.Web.UI.ScriptReference>
Public Function GetScriptReferences () As IEnumerable(Of ScriptReference)

傳回

IEnumerable 物件的 ScriptReference 集合。An IEnumerable collection of ScriptReference objects.

備註

執行這個方法來定義伺服器控制項所需的自訂腳本程式庫相依性, 例如目前 Web 應用程式的 Scripts 資料夾中的腳本, 或元件中的資源。Implement this method to define custom script library dependencies that the server control requires, such as scripts in a Scripts folder of the current Web application, or resources in an assembly. 來自 Microsoft Ajax Library 的腳本不需要以這種方式註冊。Scripts from the Microsoft Ajax Library do not have to be registered in this manner.

適用於