
Even More Form Processing But what if I want that form information a few pages later? A Request.Form will only work to grab the information from a form immediately before the current page. Here are the pages that brought you to this point (listed in the order you accessed them).
One limitation of a form is that you can only retrieve information from a form that immediately precedes the current page. So FormAction.asp can retrieve information from FormElementsInAction.asp, and FormElementProcessing.asp can get information from FormAction.asp, but FormElementProcessing.asp cannot hop all the way back to FormElementsInAction.asp and get information from a form on that page. If you want to carry information from page to page, you can use a session variable. The HTML code to do this will look like this
This will only work if the previous page has a form element called "FirstName". But once this session variable is established, it can be used on any page, for the duration of the session. The duration of the session is determined by the configuration of the web server. It is usually about fifteen minutes.
|