re display form fields after refresh

M

Michael Minter

I'm just new at this so any help more than appreciated.

I have created an email form in which all fields must be completed. If
all the fields are not completed "submit" causes a refresh using
response.redirect, Problem is allthe fields that were previously
filled in are empty.

How do I keep the values of the fields on refresh?


Thanks in advance

Michael Minter
 
T

TomB

You have two choices.

The first is to use two pages (which I'm assuming you are currently doing)
the first page contains the form that the user fills out and posts to
the second page
the second page checks the values, and if ok sends the mail, if not
returns to the first page.

The second choice is to use one page (this is easier)
the page is the same as the first page you've already created, but it
posts to itself.

In either case you need to pass the values entered by the user, back to the
form.

Using the first method, your response.redirect should contain a querystring
with the values in it......
Response.Redirect
"[email protected]&[email protected]&subject=
whatever&body=blahblahblah"
Then your input boxes would be constructed like.....
<input name=To value="<%=Request.QueryString("To")%>">

the only difference with the second method, is that you would construct your
input boxes like
<input name=To value="<%=Request.Form("To")%>">
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top