Sie Ste

Sie Ste

  • NA
  • 196
  • 184.4k

web pages communicate with each other

Jun 23 2012 2:25 AM
In a C# 2010 web form application that I am working on, I am hoping there is a better way for page 1 and page 2 to communicate with each other besides using just session variables. Basically on page 1 there are 'clear and 'next' buttons. The clear button clears the page and the 'next' button updates the database and points the user to page 2.
   On page 2, I have the following buttons: back, delete, and submit.
Basically the user enters most of their information on page 1. They hit the 'next' button to continue entering information. If the user wants to change some of the information on page 1 when they are on page 2, the user hits the 'back' button.
  Thus my problem is on page 1 for the 'next' button. This button needs to know if the user has hit the 'back' button from page 2.  If the user has returned from page 2 to page 1, the user will only update a row in the database. If this is the first time for the user on the database, then, then an insert needs to occur in the database.
  The only way I can think of for the two pages to communicte with each other is to use session variables.
  If you have any other suggestions, can you tell me what they are?

Answers (1)