ScriptManagerDesigner.GetScriptReferences Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a collection of all ScriptReference controls that are defined in a Web page's ScriptManager control and ScriptManagerProxy controls.
public:
static System::Collections::ObjectModel::ReadOnlyCollection<System::Web::UI::ScriptReference ^> ^ GetScriptReferences(System::Web::UI::ScriptManager ^ scriptManager, System::Collections::Generic::IEnumerable<System::Web::UI::ScriptManagerProxy ^> ^ proxies);
public static System.Collections.ObjectModel.ReadOnlyCollection<System.Web.UI.ScriptReference> GetScriptReferences (System.Web.UI.ScriptManager scriptManager, System.Collections.Generic.IEnumerable<System.Web.UI.ScriptManagerProxy> proxies);
static member GetScriptReferences : System.Web.UI.ScriptManager * seq<System.Web.UI.ScriptManagerProxy> -> System.Collections.ObjectModel.ReadOnlyCollection<System.Web.UI.ScriptReference>
Public Shared Function GetScriptReferences (scriptManager As ScriptManager, proxies As IEnumerable(Of ScriptManagerProxy)) As ReadOnlyCollection(Of ScriptReference)
Parameters
- scriptManager
- ScriptManager
The ScriptManager control that is associated with the Web page.
- proxies
- IEnumerable<ScriptManagerProxy>
The collection of ScriptManagerProxy controls associated with the Web page.
Returns
A read-only collection of ScriptReference controls.
Exceptions
scriptManager
is null
.
Remarks
The collection that is returned includes framework scripts that are sent automatically to the client to support AJAX functionality such as the ScriptManager and UpdatePanel control.
When you use the GetScriptReferences method, be aware of the following guidelines:
ScriptReference objects with the same Name and Assembly properties are removed as duplicates.
ScriptReference objects with the same Path are not removed as duplicates at design time. However, they are removed as duplicates at run time.
The ResolveClientUrl method is used to return a fully qualified URL for the Path property of a ScriptReference object.
The ScriptReference objects in the returned collection are cloned versions of the original script references and therefore cannot be modified in designer code by using this collection.