What is AJAX?
- AJAX is an acronym for Asynchronous JavaScript and XML.
- AJAX is a new technique for creating better, faster, and more interactive web applications.
- With AJAX, a JavaScript script can communicate directly with the server, with the XMLHttpRequest object. With this object, a JavaScript can exchange data with a web server, without reloading the page.
- AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of entire pages.
- The AJAX technique makes Internet applications smaller, faster and more user-friendly.
What is "AsyncPostBackTimeout" Property?
- AsyncPostBackTimeout Property specifies the time, in seconds, before an asynchronous postback timeout occurs if no response is received from the server.
- The default value of this property is 90 (seconds).
- We can also set the user defined error message using "asyncpostbackerrormessage" property (as shown in the code above) for the time out.
- For example:
- <asp:ScriptManager ID="scriptManager1" runat="server" AsyncPostBackErrorMessage="We can not serve your request at this moment. Please try later." AsyncPostBackTimeout="120">
- </asp:ScriptManager>
How to use Script Manager's "AsyncPostBackTimeout" at runtime?
- If you have a Script Manager on the Master page and need to exceed AsyncPostBackTimeout only on specific page, then
- Add this code line to the "Page_Load" event of your page.
- This will set the AsyncPostBackTimeout to 2 minutes.
- For example:
- ScriptManager _scriptMan = ScriptManager.GetCurrent(this);
- _scriptMan.AsyncPostBackTimeout = 120;
OR
- ScriptManager.GetCurrent(this).AsyncPostBackTimeout = 120;
Is it possible to use a "FileUpload" control within the update panel?
- Yes, it's possible.
- But we need to use Postback triggers to upload the file.
Can you list some AJAX controls?
- ScriptManager
- ScriptManagerProxy
- Timer
- UpdatePanel
- UpdateProgress
What is the "DisplayAfter" property in the UpdateProgress control?
- The Displayafter property specifies how many seconds after loading the image that it needs to be displayed in the AJAX postback.
- In other words, it gets or sets the value in milliseconds before the UpdateProgress control is displayed.
- For example:
In the following example, the "Loading" text will be displayed after 5 sec.
- <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="5000"
- AssociatedUpdatePanelID="UpdatePanel1">
- <ProgressTemplate>
- Loading...
- </ProgressTemplate>
- </asp:UpdateProgress>
How can we detect asynchronous partial page postbacks?
- Use the "IsInAsyncPostBack" property of the "ScriptManager".
- It returns a boolean value that can be used to check for partial page postbacks.

Pramod GuptaPosted Nov 3, 2015, 2:34 AM
nice
Dinesh BeniwalPosted May 8, 2013, 7:33 AM
Good Work.