Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session variables - Need Help!

Status
Not open for further replies.

Ash57

MIS
Feb 6, 2002
67
US
I’m developing some ASP.NET pages with Dreamweaver MX (DWMX)with an SQL database backend.

I will have a form visitors will fill out (from textboxes) on my web page. I want the information to be held temporarily in session variables (there will be about 20 variables between 4 pages).

Once a user reaches the end and has verified the info is correct then they can push "submit" which will write the info stored in the session variables to the database (just one table).

I understand how to declare a session variable with DWMX.

How do I assign the information from the textboxes to the session variables each time the user presses the "next step" button?
Finally, how do I write all the information collected from those session variables to the SQL database when the user clicks the "submit" button?

Thanks in advance for anyone's reply.
 
Well, when the user clicks the "Next" button just write code in the next button's event handler to set all the text box values to session variables
(Note: never used MX, only visual studio, so if MX only lets you write inline code, this may not make any sense)

When they're finished and they hit the submit button, you just need code to insert/update the record in sql.

I'm suggest creating an object to hold all 20 values though instead of having 20 seperate variables floating around, but thats just how I'd do it

hth

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top