Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retain values in text box when form is submitted incomplete 1

Status
Not open for further replies.

ef61778

IS-IT--Management
Sep 23, 2003
14
US
How can I retain the values entered into a text field on a form that is submitted incomplete. The code I have below checks for an empty string and if any if the fields are emply, I Redirect back to the .asp?error=yes page. When there, the required filed that had been entered to are now cleared. How can I retain their value so the user does not have to start over again.

<% if Request("error") = "yes" then %>
<p align="center">&nbsp; <font color="#FF0000" size="4">All fields not completed</font></td>
<% end if %>


If Request.Form("bank") = "" or _
Request.Form("Payee") = "" or _
Request.Form("dateofcheck") = "" or _
Request.Form("amount") = "" or _
Request.Form("checknum") = "" or _
Request.Form("loannum") = "" or _
Request.Form("processedby") = "" then
Response.Redirect "StopPayments.asp?error=yes"
End if
 
Code:
<input type="whatever" name="bank" value="<%=request.form("bank")%>">

...



Chris.

Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top