This ASP.NET 4.0 tutorial explains how to optimize Ajax partial rendering.
Web developer can exclude the first drop-down from the UpdatePanel, leaving only the second one. Then he/she can instruct the UpdatePanel to refresh when the first list value is changed. This instruction is known as a trigger and is shown in the next snippet.
<asp:DropDownList runat=”server” ID=”Cities” …></asp:DropDownList>
<asp:DropDownList ID=”BankBranches” …></asp:DropDownList>
The Triggers property of the UpdatePanel contains the external controls that cause the panel to be updated. A trigger can be one of two types:
- AsyncPostBackTrigger—Causes the Ajax PostBack
- PostBackTrigger—Causes the classic PostBack
Each class has two properties:
- ControlId—Represents the name of the control that triggers PostBack
- EventName—The control event that triggers PostBack
Now, after these modifications, each time the Cities drop-down list is changed, the page is submitted asynchronously, and only the BankBranches drop-down list is sent to the client (along with ViewState and other minor information).
If you want to host ASP.NET AJAX application then you will need ASP.NET AJAX hosting provider which supports AJAX Framework.