tags:

views:

26

answers:

2

Hai sir,

I am having a task that, i need to insert a row in gridview but it should not effect in to database immideately. I am having a submit button in the form, whenever i click that submit button all the data in the form should be inserted into the database in their respective tables. If you can please help me.

Thanking you, Anil kumar.

A: 

You can store the data in Session until you're ready to save it in the database.

Why don't you want to save the data in the database to start with?

roman m
+1  A: 

First of all, look for a good Design pattern (mostly recommanded MVC or MVP) cause its obviously that u are not using...
If you wanna do ST like shopping basket in your website, I have to say that the best way is to add all of them in a Collection of ur particular class datatype in Session and then, when the user clicked on ur Submit button, so simple read all of them and insert to ur database...
Also you can bind your collection variable to your DataGrid in order to show what is in the basket...
Good luck

Dr TJ