We will follow the previous post example for the data editing.

asp listview itemupdating-61

We have explored the basics and adding paging feature to List View control through my previous articles List View Control in ASP. Like my previous articles on List View control, we will add this feature in 2 scenarios.

Our next step in learning List View Control is to add edit/update/delete/insert feature to the List View control.

Your code can handle this event but your code cannot raise it.

It would make more sense just to create a method that does the updating rather than try and raise an event which you are going to handle in a method anyways.

I need to set focus to a textbox inthis template after post back because the List View is in a longscrolling div.

Without setting focus the user needs to scroll down thediv after postback to get to the item. Specify the Layout Template, Item Template, Edit Item Template, Insert Item Template that displays the List View similar to the previous section. To make the implementation simple, i have made it as inline query and it is a good practise to have it as SP's. Thus, we have learnt how to provide edit/update/delete and insert feature for List View Control. Now click on Edit button you will see the following output.Protected Sub List View1_Item Inserting(By Val sender As Object, By Val e As System. Drag a Sql Data Source control from the data tab of Visual Studio 2008.