Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








Skip Navigation Links.
ScriptManager Class
ScriptManager Constructor
AllowCustomErrorsRedirect Property
AsyncPostBackError Event
AsyncPostBackErrorMessage Property
AsyncPostBackSourceElementID Property
AsyncPostBackTimeout Property
AuthenticationService Property
EnablePageMethods Property
EnablePartialRendering Property
EnableScriptGlobalization Property
EnableScriptLocalization Property
GetCurrent Method (page)
IsDebuggingEnabled Property
IsInAsyncPostBack Property
LoadPostData Method (postDataKey, postCollection)
LoadScriptsBeforeUI Property
OnAsyncPostBackError Method (e)
OnInit Method (e)
OnPreRender Method (e)
OnResolveScriptReference Method (e)
ProfileService Property
RaisePostDataChangedEvent Method
RegisterArrayDeclaration Method
RegisterArrayDeclaration Method (control, arrayName, arrayValue)
RegisterArrayDeclaration Method (page, arrayName, arrayValue)
RegisterAsyncPostBackControl Method (control)
RegisterClientScriptBlock Method
RegisterClientScriptBlock Method (control, type, key, script, addScriptTags)
RegisterClientScriptBlock Method (page, type, key, script, addScriptTags)
RegisterClientScriptInclude Method
RegisterClientScriptInclude Method (control, type, key, url)
RegisterClientScriptInclude Method (page, type, key, url)
RegisterClientScriptResource Method
RegisterClientScriptResource Method (control, type, resourceName)
RegisterClientScriptResource Method (page, type, resourceName)
RegisterDataItem Method
RegisterDataItem Method (control, dataItem)
RegisterDataItem Method (control, dataItem, isJsonSerialized)
RegisterDispose Method (control, disposeScript)
RegisterExpandoAttribute Method (control, controlId, attributeName, attributeValue, encode)
RegisterExtenderControl Method (extenderControl, targetControl)
RegisterHiddenField Method
RegisterHiddenField Method (control, hiddenFieldName, hiddenFieldInitialValue)
RegisterHiddenField Method (page, hiddenFieldName, hiddenFieldInitialValue)
RegisterOnSubmitStatement Method
RegisterOnSubmitStatement Method (control, type, key, script)
RegisterOnSubmitStatement Method (page, type, key, script)
RegisterPostBackControl Method (control)
RegisterScriptControl Method (scriptControl)
RegisterScriptDescriptors Method
RegisterScriptDescriptors Method (extenderControl)
RegisterScriptDescriptors Method (scriptControl)
RegisterStartupScript Method
RegisterStartupScript Method (control, type, key, script, addScriptTags)
RegisterStartupScript Method (page, type, key, script, addScriptTags)
Render Method (writer)
ResolveScriptReference Event
ScriptMode Property
ScriptPath Property
Scripts Property
Services Property
SetFocus Method
SetFocus Method (clientID)
SetFocus Method (control)
SupportsPartialRendering Property
Visible Property

Scripts Property

Gets a ScriptReferenceCollection object that contains ScriptReference objects that are registered with the ScriptManager control declaratively or programmatically.



[EditorAttribute("System.Web.UI.Design.CollectionEditorBase, System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(UITypeEditor))]
public ScriptReferenceCollection Scripts { get; }


<PersistenceModeAttribute(PersistenceMode.InnerProperty)> _
<DefaultValueAttribute(Nothing)> _
<EditorAttribute("System.Web.UI.Design.CollectionEditorBase, System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType())> _
<CategoryAttribute("Behavior")> _
<MergablePropertyAttribute(False)> _
Public ReadOnly Property Scripts As ScriptReferenceCollection


[EditorAttribute(L"System.Web.UI.Design.CollectionEditorBase, System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof())]
ScriptReferenceCollection^ Scripts {
	ScriptReferenceCollection^ get ();


/** @property */


Return Value

The ScriptReferenceCollection object of the ScriptManager instance.


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">
    <asp:ScriptReference Name="Script.js" />

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)