Using ASP.NET AJAX UpdatePanels
If you want only a portion of your web form to update on a post back, you can place the controls to be refreshed inside an UpdatePanel, then specify the user action that refreshes the control within the panel.
- Drag an UpdatePanel from the Visual Studio ToolBox and drop it on your form.
- Add controls to the UpdatePanel. For example, if you want to display a list of customer orders in a GridView you can drop the GridView control in the UpdatePanel. Bind the user interface controls to an MM .NET business object.
- Add a control to the form that will be used to trigger an update to the UpdatePanel. For example, you can drop a ListBox on the form that you bind to a list of Customers.
- To specify the user action to refresh the UpdatePanel controls, select the UpdatePanel in design mode, then go to the Properties Window. Select the Triggers property, then click its associated ellipses button.
- In the UpdatePanelTrigger Collection Editor dialog, click the Add button to add a trigger for the UpdatePanel:

- In the right side of the dialog set the ControlID property to the control you want to trigger an update. Then set the EventName property to the control's event you want to trigger an update:

- Click OK to save the new trigger and close the dialog.
- If you have selected a trigger that does not normally cause a postback (such as SelectedIndexChanged on a ListBox), you need to go to the trigger control and set its AutoPostBack property to true
- Add an event handler for the control event you have specified to trigger an update to the UpdatePanel. For example:
protected void lstCustomers_SelectedIndexChanged(object sender, EventArgs e) { this.oOrder.GetOrdersByCustomerID(this.lstCustomers.SelectedValue); }.
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 05/30/07
Comment or report problem with topic
