You submit the form as normal, but on the page it is submitted to is where
you add the values to the Session Variables.
Coding "off the cuff" is dangerous for me but it would look something like
this on the second page. If the Session Variable is called "Person" and the
form field is called "MyName" then:
Session("Person") = Request.Form("MyName")
From here it will stay in the Session Variable as long as the Session is
alive or until you change it to some other value. It will be available to
any page at anytime after that as long as it is the same Session.
To retreive it into a variable:
strMyString = Session("Person")
To display it in the browser:
Resonse.write Session("Person")
--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
"Keith" <@.> wrote in message news:#j*************@tk2msftngp13.phx.gbl...
I have a number of form fields that I wish to temporarily record into
variables and pass to a small number of subsequent pages.
Is the best way to save each one to a session variable when I submit the
form and then to clear the variables when I no longer need them?
Also, if this is the best method, what is the code for saving a form field
to a session variable when the form has not yet been submitted. For
example, when I submit Form1, I want the contents of Field1 to be entered
into SessionVariable1 and then the form to be submitted as normal.