how to make a form keep it's values after submit?

M

meg

I have a form that submits to the same page, from that form I want to use dates that were selected for the
next form's submittal (to the same page) but the values go back to empty after the first submittal. Is there
a way to make a form keeps its values after submission without using session objects?

Thanks!
 
S

Stefan B Rusynko

Use server side coding
In the page before the Form
<% TheDate= Request.Form("TheDate") %>
And in the form field value use
<%=TheDate%>



|I have a form that submits to the same page, from that form I want to use dates that were selected for the
| next form's submittal (to the same page) but the values go back to empty after the first submittal. Is there
| a way to make a form keeps its values after submission without using session objects?
|
| Thanks!
|
|
 
K

Kevin Spencer

....assuming, of course, that the form is an ASP page.

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
M

meg

It is an asp page, and I do have the code as specified below, however, the first form works fine, but say for
instance i wanted to use "The Date" variable as you have below, for a second form on the same page. The
variable is empty after the form has been submitted.

This is what my page does. I have two calendar objects where a user selects a date. Upon selection of a
date, the dates appear in text boxes that were 'hidden'. A query button appears which the user clicks and the
user gets results in the form of a table. Upon submission the text boxes and query button disappear again
(because their original style is set to be hidden) - which i don't mind, but if I wanted to make them stay I
would like to know how.. but anyway, I have a second form on the page that appears after the first submittal
where I want the user to be able to make a selection from a drop down box, plus using the original 2 dates,
and show another set of results. But the dates are gone. Variables are empty. I want to keep those values.

Does that make more sense?


....assuming, of course, that the form is an ASP page.

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top