Syntax
CSharp
VisualBasic
ManagedCPlusPlus
JSharp
Value
Return Value
The ScriptReferenceCollection object of the ScriptManager instance.
Remarks
The ScriptReferenceCollection object that is returned by this property is a collection of ScriptReference objects, each of which represents a script file. The collection includes references to all of the script blocks that Microsoft ASP.NET 2.0 AJAX Extensions needs to run and the script blocks that will be rendered to the browser. Script blocks that will be rendered to the browser can be defined in the ScriptManager control or in an associated ScriptManagerProxy control.
You can add script blocks to the collection in markup by adding <asp:ScriptReference> nodes to a <Scripts> node inside the <asp:ScriptManager> instance on the page, as shown in the following example.
<asp:ScriptManager ID="SM1" runat="server">
<Scripts>
<asp:ScriptReference Name="Script.js" />
</Scripts>
</asp:ScriptManager>You can also add a ScriptReference object to the Scripts collection in code by using the Add(Q) method of the ScriptReferenceCollection class.
The ScriptManager control registers script blocks during the control's PreRender event.
The Scripts collection does not contain the core Microsoft AJAX Library scripts. The scripts in the core library are rendered automatically; they do not need to be registered with the ScriptManager control. However, if you want to override a core script or any control script and substitute a different version of the script, you can add your version to the Scripts collection.
Assembly: System.Web.Extensions (Module: System.Web.Extensions)