views:

204

answers:

1

Hi,

We have an ASP.NET application and using a ListView to display some user records from Database.

Once we populate the ListView from database the user can edit few/more records of it.

Now our requirement is that once the user edits a record we need post those changes to database but should not rebind the ListView (from database). We also should not use Cache or Session object to store the data of ListView.

Do you think that it is possible? If so would you please guide / refer a code sample on this?

Thanks and Regards.

A: 

Use 2 dataset. Consider D1 and D2

Bind the ListView with D1, once the user edit the D1.

Copy the D1 to D2, Accespt changes on D2.

But Reject the changes in the D1, so it will be with old values bind that to listview.

But the DB has been updated using D2.

-- BUT tell me why you want do like this ?? when ever the user edit something it should reflect

both on his/her screen and DB, then only there should be a consistancy between data.

solairaja