PDA

Click to See Complete Forum and Search --> : Passing a parameter to another form


Bigley
Sep 13th, 2000, 08:47 AM
Ok guys I am counting on you here. I need to pass the contents of a test box to an ASP where it can then query a database. I am trying to do this on a button click but having no success - the story so far:
<html>

<head>
<title>Search</title>
</head>

<body>

<form Name="InputForm" ACTION="default.asp?Customer=Customer" method="POST">
<div align="center"><center><p><font face="Tahoma">Please enter customer number for
search&nbsp;&nbsp;&nbsp; </font><input type="text" name="Customer" size="11" maxlength="8"
value>&nbsp;&nbsp;&nbsp; <input type="submit" value="Search" style="font-family: Tahoma"></p>
</center></div>
</form>
</body>
</html>

Should I be doing this in the form tag?
Should the parameter being passed be inside the quotes?
HELP!

Ianpbaker
Sep 13th, 2000, 09:01 AM
Hi Bigley

First. get rid of the ?Customer=Customer in the form tag.

Second. In your default.asp, to get the value back into a variable do

strCustomer (can be anything you want) = Request.Form("Customer")

Hope this helps

Ian

artsapimp
Sep 13th, 2000, 11:44 PM
To put it into code it would look like this...

default.asp -

<form action="submit.asp" method="post">
<input type="text" name="info"><br>
<input type="submit" value="Go">
</form>


submit.asp -

<%= Request.Form("info")%>

Bigley
Sep 14th, 2000, 03:02 AM
Thanks guys I have it working now.