Can a querystring be used to load input fields in a target page?

D

daforga

I am validating page input on a server page. If the test passes, a task is
performed, if it fails, the user should be sent back to the origional page
with the correctly submitted variables still showing. The test holds, but I
am having trouble finding the code to re-show the variables on return. I am
currently using the following code (a trimmed down version of my pages.)
If and when I get this working my further question is :
Is there a better way of doing this? I have to validate on the server.
Can anyone help me with this?
Thanks



Here is the calling page:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<title>Test</title>
</HEAD>
<body>
<form id="InfoRequest" action="page2.asp" method="post"
name="FrontPage_Form1">
<table width="400" border="0" cellspacing="0" cellpadding="3" ID="Table4">
<tr bgcolor="#336699">
<td>
<input id="text1" name="KeepName1">
</td>
<td>
<input id="Text2" name="KeepName2">
</td>
</tr>
<tr>
<td bgcolor="#336699">
<font color="white"><b>Value one - Keep on return </b></font><font
face="Arial, Helvetica, Geneva, Swiss, SunSans-Regular">
</font>
</td>
<td bgcolor="#336699">
<font color="white"><b>Value two - Keep on return </b></font><font
face="Arial, Helvetica, Geneva, Swiss, SunSans-Regular">
</font>
</td>
</tr>
<tr bgcolor="#336699">
<td>
<input id="Text7" name="_text7" value="zzz">
</td>
<td>
<input id="text" name="_CaptchaBox">
</td>
<tr>
<td bgcolor="#336699">
<font color="white"><b>This is a constant </b></font><font
face="Arial, Helvetica, Geneva, Swiss, SunSans-Regular">
</font>
</td>
<td bgcolor="#336699">
<font color="white"><b>Clear on return</b></font><font face="Arial,
Helvetica, Geneva, Swiss, SunSans-Regular">
</font>
</td>
</tr>
<tr height="25" bgcolor="#336699">
<td colspan="2" height="25">
<input type="submit" value="Submit" ID="Submit2" NAME="_Submit2">
</td>
</tr>
</table>
</form>
<hr>
<p></p>
</TD></TR></TABLE> <map name="phonebc0a3c7c"></map><map
name="womanbc0a1b76"></map>
<map name="roambc0a1b94">
<area shape="RECT" coords="2,1,149,68" href="rivfin_roam.html">
</map>
<p></p>
<DIV></DIV>
</body>
</HTML>

Here is the page with the Redirect back to origional page:
<%@ Language=VBScript %>
<%
If Trim(UCase(Request("_CaptchaBox"))) = Trim(UCase(Request("_text7")))then
Response.Write("Good" + Request("_CaptchaBox") + " ")
Response.Write(Request("_text7"))
else
Response.Redirect("page1.asp?Keepname1" +
Request("KeepName1")
+"&KeepName2" + Request("KeepName2"))
end if
%>
 
E

Evertjan.

=?Utf-8?B?ZGFmb3JnYQ==?= wrote on 10 feb 2009 in
microsoft.public.inetserver.asp.general:
.... but I am having trouble finding the code to re-show
the variables on return.

Asked in and answered on your other posting.
 

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,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top