WEBSWAPP Silverlight ASP.NET 3.5 ASP.NET 2.0 ASP.NET 1.0
Cascading Lists
AJAX ToolKit
Hierarchies
C#-ListView C#-GridView UpdatePanel

In this demo, I start from the ListView demo then I add the following features:

  1. AJAX updatepanel: around the ListView.
  2. Client-side event handling of the AJAX UpdatePanel; namely the PageRequestManager.beginRequest. By handling this event, I disable the button to prevent the user from submitting the same request twice.
  3. I also handle the ScriptManager.AsyncPostBackError Event to trap any exception that happens during an asynchronous postback process. I then suppress the ASP.NET custom error redirect by setting a property named AllowCustomErrorsRedirect="false" on the AJAX ScriptManager control.
  4. After successfully inserting a record, I set the selected record to inserted one. This allows the user to view/edit the record that was just inserted.
  5. I created a TemplatePagerField in which I placed a reset button and handled the TemplatePagerField.PagerCommand Event in order to reset the selected items to all records.

AJAX UpdatePanel and AJAX client-side event handling

Suite#:
Address Line 1: 5
Address Line 2:
Location: Abbeville, Alabama, United States
Postal Code:
Address Type: Home
Insert new contact address
Suite#:
Address Line 1:  
Address Line 2:
Location:

Postal Code:
Address Type:

    

Source code:

UpdatePanel source code wucAddressType.ascx wucCity.ascx