|
 |
asp_web_howto thread: what is the best way to retain data on a form
Message #1 by tzhang@h... on Tue, 20 Feb 2001 22:26:28
|
|
Hi:
I have a small form which consists of two textboxes, one multiple select
box and one single select box. How can I retain user's input after user
clicks "submit" button ("submit" button will open another window).
Thanks!
Message #2 by "Drew, Ron" <RDrew@B...> on Wed, 21 Feb 2001 07:47:33 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C09C04.756DDB70
Content-Type: text/plain
Hope I understand this correctly....Small form you have may have the
following:
....................first html with form................
<form action="viewhr.asp" method=post>
<p align=left>Please enter fields below to filter output:</p>
<table>
<tr>
<td><INPUT size="30" Name="lastname" ></td>
<td><b> Last Name</b> </td>
</tr>
<tr>
<td><INPUT size="30" Name="firstname" ></td>
<td><b> First Name</b> </td>
</tr>
<tr>
<td><INPUT Name="misdesc" ></td>
<td><b> Like
Description for MIS</b> </td>
</tr>
</table>
</p>
<p><INPUT TYPE="submit" Value="Start Query" id=SUBMIT1 name=SUBMIT1>
<INPUT TYPE="reset" Value="Reset"></p>
</form>
........................end of first html....now to the viewhr.asp it is
going to.....
<%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Gets the Parameters from Form
function GetParams()
Dim strlastname, strfirstname, strmisdesc
strlastname = Request.Form("lastname")
strfirstname = Request.Form("firstname")
strmisdesc = Request.Form("misdesc")
Response.Write "<b>Parameters: </b>"
Response.Write "<b>Lastname>  </b>"
Response.Write strlastname
Response.Write "<b>Firstname>  </b>"
Response.Write strfirstname
Response.Write "<b>MIS Desc>  </b>"
Response.Write strmisdesc
end function
%>
Somewhere in the html part of this asp do a
Response.Write GetParams()
Once you get the form entries like strlastname etc. do as you see fit with
them....
-----Original Message-----
From: tzhang@h... [mailto:tzhang@h...]
Sent: Tuesday, February 20, 2001 5:26 PM
To: ASP Web HowTo
Subject: [asp_web_howto] what is the best way to retain data on a form
Hi:
I have a small form which consists of two textboxes, one multiple select
box and one single select box. How can I retain user's input after user
clicks "submit" button ("submit" button will open another window).
Thanks!
$subst('Email.Unsub')
Message #3 by tzhang@h... on Wed, 21 Feb 2001 20:15:33
|
|
Thank you for your help.
I guess i did not express my needs very well.
What I want is: after user finishes his data entry and clicks the submit
button, he can use browser's back button to go back to the form page and
all the data he entered is still there in the form.
Thank you again!
> This message is in MIME format. Since your mail reader does not
understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_001_01C09C04.756DDB70
> Content-Type: text/plain
>
> Hope I understand this correctly....Small form you have may have the
> following:
> ....................first html with form................
> <form action="viewhr.asp" method=post>
> <p align=left>Please enter fields below to filter output:</p>
> <table>
> <tr>
> <td><INPUT size="30" Name="lastname" ></td>
> <td><b> Last Name</b> </td>
> </tr>
> <tr>
> <td><INPUT size="30" Name="firstname" ></td>
> <td><b> First Name</b> </td>
> </tr>
> <tr>
> <td><INPUT Name="misdesc" ></td>
> <td><b> Like
> Description for MIS</b> </td>
> </tr>
> </table>
> </p>
> <p><INPUT TYPE="submit" Value="Start Query" id=SUBMIT1 name=SUBMIT1>
> <INPUT TYPE="reset" Value="Reset"></p>
> </form>
> ........................end of first html....now to the viewhr.asp it is
> going to.....
> <%
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> 'Gets the Parameters from Form
> function GetParams()
> Dim strlastname, strfirstname, strmisdesc
> strlastname = Request.Form("lastname")
> strfirstname = Request.Form("firstname")
> strmisdesc = Request.Form("misdesc")
> Response.Write "<b>Parameters: </b>"
> Response.Write "<b>Lastname>  </b>"
> Response.Write strlastname
> Response.Write "<b>Firstname>  </b>"
> Response.Write strfirstname
> Response.Write "<b>MIS Desc>  </b>"
> Response.Write strmisdesc
> end function
> %>
>
> Somewhere in the html part of this asp do a
> Response.Write GetParams()
> Once you get the form entries like strlastname etc. do as you see fit
with
> them....
>
>
>
> -----Original Message-----
> From: tzhang@h... [mailto:tzhang@h...]
> Sent: Tuesday, February 20, 2001 5:26 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] what is the best way to retain data on a form
>
>
> Hi:
>
> I have a small form which consists of two textboxes, one multiple select
> box and one single select box. How can I retain user's input after user
> clicks "submit" button ("submit" button will open another window).
>
> Thanks!
> $subst('Email.Unsub')
>
> ------_=_NextPart_001_01C09C04.756DDB70
> Content-Type: text/html
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html;
> charset=3DUS-ASCII">
> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version
> 5.5.2652.35">
> <TITLE>RE: [asp_web_howto] what is the best way to retain data on a
> form</TITLE>
> </HEAD>
> <BODY>
>
> <P><FONT SIZE=3D2>Hope I understand this correctly....Small form you
> have may have the following:</FONT>
> <BR><FONT SIZE=3D2>....................first html with
> form................</FONT>
> <BR><FONT SIZE=3D2><form action=3D"viewhr.asp"
> method=3Dpost></FONT>
> <BR><FONT SIZE=3D2> <p align=3Dleft>Please enter fields
> below to filter output:</p></FONT>
> <BR><FONT SIZE=3D2> <table></FONT>
> <BR><FONT SIZE=3D2> <tr></FONT>
> <BR><FONT SIZE=3D2> <td><INPUT
> size=3D"30" Name=3D"lastname"
> ></td></FONT>
> <BR><FONT SIZE=3D2>
> <td><b> Last
> Name</b> </td></FONT>
> <BR><FONT SIZE=3D2> </tr></FONT>
> <BR><FONT SIZE=3D2> <tr></FONT>
> <BR><FONT SIZE=3D2> <td><INPUT
> size=3D"30" Name=3D"firstname"
> ></td></FONT>
> <BR><FONT SIZE=3D2>
> <td><b> First
> Name</b> </td></FONT>
> <BR><FONT SIZE=3D2> </tr></FONT>
> <BR><FONT SIZE=3D2> <tr></FONT>
> <BR><FONT SIZE=3D2> <td><INPUT
> Name=3D"misdesc" ></td></FONT>
> <BR><FONT SIZE=3D2>
> <td><b> Like </FONT>
> <BR><FONT SIZE=3D2> Description for
> MIS</b> </td></FONT>
> <BR><FONT SIZE=3D2> </tr></FONT>
> <BR><FONT SIZE=3D2> </table></FONT>
> <BR><FONT SIZE=3D2> </p></FONT>
> <BR><FONT SIZE=3D2> <p><INPUT TYPE=3D"submit"
> Value=3D"Start Query" id=3DSUBMIT1 name=3DSUBMIT1>
> </FONT>
> <BR><FONT SIZE=3D2> <INPUT
> TYPE=3D"reset"
> Value=3D"Reset"></p> </FONT>
> <BR><FONT SIZE=3D2></form></FONT>
> <BR><FONT SIZE=3D2>........................end of first html....now to
> the viewhr.asp it is going to.....</FONT>
> <BR><FONT SIZE=3D2><%</FONT>
> <BR><FONT
> SIZE=3D2>'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</FO
> NT>
> <BR><FONT SIZE=3D2>'Gets the Parameters from Form</FONT>
> <BR><FONT SIZE=3D2> function GetParams()</FONT>
> <BR><FONT SIZE=3D2> Dim strlastname, strfirstname, strmisdesc
> </FONT>
> <BR><FONT SIZE=3D2> strlastname =3D
> Request.Form("lastname")</FONT>
> <BR><FONT SIZE=3D2> strfirstname =3D
> Request.Form("firstname")</FONT>
> <BR><FONT SIZE=3D2> strmisdesc =3D
> Request.Form("misdesc")</FONT>
> <BR><FONT SIZE=3D2> Response.Write
> "<b>Parameters: </b>"</FONT>
> <BR><FONT SIZE=3D2> Response.Write
> "<b>Lastname>  </b>"</FONT>
> <BR><FONT SIZE=3D2> Response.Write strlastname</FONT>
> <BR><FONT SIZE=3D2> Response.Write
> "<b>Firstname>  </b>"</FONT>
> <BR><FONT SIZE=3D2> Response.Write strfirstname</FONT>
> <BR><FONT SIZE=3D2> Response.Write "<b>MIS
> Desc>  </b>"</FONT>
> <BR><FONT SIZE=3D2> Response.Write strmisdesc</FONT>
> <BR><FONT SIZE=3D2> end function</FONT>
> <BR><FONT SIZE=3D2> %></FONT>
> </P>
>
> <P><FONT SIZE=3D2>Somewhere in the html part of this asp do a </FONT>
> <BR><FONT SIZE=3D2> Response.Write GetParams()</FONT>
> <BR><FONT SIZE=3D2>Once you get the form entries like strlastname
> etc. do as you see fit with them....</FONT>
> </P>
> <BR>
> <BR>
>
> <P><FONT SIZE=3D2>-----Original Message-----</FONT>
> <BR><FONT SIZE=3D2>From: tzhang@h... [<A
> HREF=3D"mailto:tzhang@h...">mailto:tzhang@h...</A>]</FONT>
> <BR><FONT SIZE=3D2>Sent: Tuesday, February 20, 2001 5:26 PM</FONT>
> <BR><FONT SIZE=3D2>To: ASP Web HowTo</FONT>
> <BR><FONT SIZE=3D2>Subject: [asp_web_howto] what is the best way to
> retain data on a form</FONT>
> </P>
> <BR>
>
> <P><FONT SIZE=3D2>Hi:</FONT>
> </P>
>
> <P><FONT SIZE=3D2>I have a small form which consists of two textboxes,
> one multiple select </FONT>
> <BR><FONT SIZE=3D2>box and one single select box. How can I
> retain user's input after user </FONT>
> <BR><FONT SIZE=3D2>clicks "submit" button ("submit"
> button will open another window).</FONT>
> </P>
>
> <P><FONT SIZE=3D2>Thanks!</FONT>
> <BR><FONT SIZE=3D2>---</FONT>
> <BR><FONT SIZE=3D2>
> RDrew@B...</FONT>
> <BR><FONT SIZE=3D2>
> $subst('Email.Unsub')</FONT>
> </P>
>
> </BODY>
> </HTML>
> ------_=_NextPart_001_01C09C04.756DDB70--
|
|
 |