Perform Transaction Across Multiple Pages

Posted by Alok under ASP.NET on 3/6/2012 | Points: 10 | Views : 1142 | Status : [Member] | Replies : 5
Suppose I have three Pages,
User Submit data on First Pages,Then redirect to second page And submit some data on this Page and Again redirect to third Page.
Unfortunately User Cancel Submition of Final Data on Last(third)Page.

I Want To know How To perform Transaction Across Multiple Pages. .So that If At Any Step User Decide to Quit ..All Previous Submitted Data Would be deleted from Database or Rollback.

Thanks & Regards,
Alokssm



Responses

Posted by: Hmanjarawala on: 3/6/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,
For this don't store those data to database on submit click of 1st and 2nd page.
store them into session...
and when user press submit button on last page....
store all data from session to database...
so at any stage when user wants to cancel just clear them from session.

Mark this as answer if it helps you, that motivates.....

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Alok on: 3/6/2012 [Member] Starter | Points: 25

Up
0
Down
I Think It is not feasible to store lots of Data in session..Becuse Each Page contains at least 50 data..

Thanks & Regards,
Alokssm

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 3/6/2012 [Member] Bronze | Points: 25

Up
0
Down
just make Key-Value pair of data and store them in a string.
i.e. Name-Himanshu:Address-XXXXX..like that
and store this string into session...
then it will feasible

Mark this as answer if it helps you, that motivates.....


Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/13/2012 [Member] Starter | Points: 25

Up
0
Down
Hi
Alok,

You can Rollback previous transaction if third page transaction is not succeed,

or you can delete that record on cancel button click if user cancel submission of data on 2nd or 3rd page.

Thanks

Rajendra Patel

R D Patel

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/13/2012 [Member] Silver | Points: 25

Up
0
Down
Since you have multiple pages, while submit fist page you store data in database and return the unique id field.
Pass this filed to 2nd and 3rd page , anytime you feel to cancel call the cancel method passing the unique field which should delete the previous entries.
You could have use Transactional Statements , has it been a single page and multiple transactions.

Thanks,
Sanjay

Alok, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response