ASP.NET Tutorials
Sheo Narayan

Win Prizes

Social Presence
Like us on Facebook

Silverlight Tutorials | Report a Bug in the Tutorial

ScriptManager Control

ScriptManager control is the parent control that needs to be there on every page wherever we are trying to use ASP.NET AJAX controls. ScriptManager control manages client script for AJAX enabled ASP.NET pages. This control enables client script to use the type system extensions and support features for partial page rendering, webservice calls etc.

There are bunch of properties and method associated with ScriptManager control but I am going to show few properties that are oftenly used.

AllowCustomErrorsRedirect Gets or sets a value that determines whether custom errors section of the web.config file is used during error.
AsyncPostBackErrorMessage Gets or sets the error message that is sent to the client when an unhandled server exception occurs during an ahynchronous postback.
AsyncPostBackTimeout Gets or sets the time in seconds before asynchronous postbacks time our if no response is received.
ClientID Gets the server control identifier generated by ASP.NET (The id for this control that is rendered on the page)
EnablePageMethods Gets or sets whether public static page methods in page can be called from client script.
EnableViewState Gets or sets a value that indicates whether server control persists its viewstate and the viewstate of its child control if any.
IsInAsyncPostBack Gets or sets a value that indicates whether the current postback is being executed in partial rendering mode.
DEMO : ScriptManager Show Source Code
As written earlier this is a parent control that should be used on every page where we want to use other controls of the ASP.AJAX. A standard code for ScriptManager control will look like following.
<asp:ScriptManager ID="ScriptManger1" runat="Server" EnablePartialRendering="True" />