views:

13

answers:

1

I do not have any code to show, but using asp.net, vb.net, and SQL with stored procedures.

If on a page I have an item that is added to the database and therefore that information is "saved", is there a way to have an ("exit without saving") button on the page that does away with those changes?

Using infragisitcs ultrawebgrid, you add an item to one table. You can add an item to another table on that page. i assume adding these items to the table automatically saves in the database. There is also a text box but without clicking save I do not believe that those items are actually added to the database. Update panel is used, I don't know if that matters.

If after someone adds to the table but then decides.. oh wait.. I don't want to do this just yet, is there a "one-click" way to act as if I never visited that page to add info? I'm assuming it would be deleting the entries but this would have to be limited to deleting ONLY those items added while making... we don't want people adding info, then going back and deleting once the "save" button has been pushed.

A: 

There are a couple of options for handling 'undo,' you can handle it after they save by using markers in your database, or you can cache changes until they hit a 'commit' button that then saves their changes in the database.

Caching changes is the cheaper implementation, but then you can get caught with users who haven't figured out that they're not really saving anything until they take that final step.

Beth