Passing Variables Between ASP Pages using POST

D

David E

Hello

I having trouble with this action cause I want the user to be able to
use the back button and the submitted data should be still in their
form. So I the user send invalid data he can back browse and change
the invalid data. I use method=POST cause its a lot of data i send
between pages + client is IE6.

Some information here:
http://www.4guysfromrolla.com/webtech/faq/Intermediate/faq5.shtml

Right now i experiment with POST to it self then submit to the next
page but I can get it to work.

Anyone knows how to do this or is it impossible?

TIA

David E
 
R

Ray Costanzo [MVP]

Eliminate the next page and just post the form to itself. What I often do
is something like:

<%
''validation of some sort
If Request.Form("input1") = "specific" and Request.Form("input2") = "text"
Then
'''your code that does what you need
Response.Redirect "thankyou.asp"
End If
%>

<form method="post" action="thissamepage.asp">
<input name="input1" value="<%=f("input1")%>">
<input name="input2" value="<%=f("input2")%>">
<input type="submit">
</form>
<%
Function f(x)
f = Server.HTMLEncode(Request.Form(x))
End Function
%>

Ray at work
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top