Programming Microsoft ASP.NET 4 - Dino Esposito [443]
Indicates whether static page methods on an ASP.NET page can be called from client script. The property is set to false by default.
EnablePartialRendering
Indicates whether partial rendering is enabled for the page. The property is set to true by default.
EnableScriptGlobalization
Indicates whether the ScriptManager control renders script in the client that supports the parsing and formatting of culture-specific information. The property is set to false by default.
EnableScriptLocalization
Indicates whether the ScriptManager control retrieves script files for the current culture, if they exist. The property is set to false by default.
EnableSecureHistoryState
Indicates whether to encrypt the history state string.
IsDebuggingEnabled
Indicates whether the debug versions of client script libraries will be rendered. The debug attribute on the @Page directive doesn’t affect this property.
IsInAsyncPostBack
Indicates whether the current page request is the result of an asynchronous postback.
IsNavigating
Indicates whether a Navigate event is currently being handled.
LoadScriptsBeforeUI
Indicates whether scripts are loaded before or after markup for the page UI is loaded.
ProfileService
Gets an object through which you can set preferences for the client-side profile service.
RoleService
Gets an object through which you can set preferences for the client-side role service.
ScriptMode
Gets and sets the type (debug or retail) of scripts to load when more than one type is available. Possible values come from the ScriptMode enumeration type: Auto, Inherit, Debug, or Release. The default value is Auto, meaning that the type of script is determined on the fly.
ScriptPath
Indicates that scripts should be loaded from this path instead of from assembly Web resources.
Scripts
Gets a collection of script references that the ScriptManager control should include in the page.
Services
Gets a collection of service references that the ScriptManager control should include in the page.
SupportsPartialRendering
Indicates whether a particular browser or browser version can support partial page rendering. If this property is set to false, regardless of the value of the EnablePartialRendering property, no partial rendering will be supported on the page. The property is set to true by default.
The script manager is the nerve center of any ASP.NET AJAX pages and does all the work that is necessary to make AJAX features function as expected. Enabling AJAX features mostly means injecting the right piece of script in the right place. The script manager saves ASP.NET developers from dirtying their hands with JavaScript.
Methods of the ScriptManager Control
Table 20-2 lists the methods defined on the ScriptManager control.
Table 20-2. Methods of ScriptManager
Method
Description
AddHistoryPoint
Creates a history point, and adds it to the browser’s history stack.
GetCurrent
Static method, returns the instance of the ScriptManager control active on the current page.
GetRegisteredArrayDeclarations
Returns a read-only collection of ECMAScript array declarations that were previously registered with the page.
GetRegisteredClientScriptBlocks
Returns a read-only collection of client script blocks that were previously registered with the ScriptManager control.
GetRegisteredDisposeScripts
Returns a read-only collection of dispose scripts that were previously registered with the page.
GetRegisteredExpandoAttributes
Returns a read-only collection of custom (expando) attributes that were previously registered with the page.
GetRegisteredHiddenFields
Returns a read-only collection of hidden fields that were previously registered with the page.
GetRegisteredOnSubmitStatements
Returns a read-only collection of onsubmit statements that were previously registered with the page.
GetRegisteredStartupScripts
Returns a read-only collection of startup scripts that were previously registered with the page.
GetStateString
Retrieves a string that contains key/value pairs