473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

string query won't work

Hey guys need some advice I have this simple string query code that collects data from the "form collection" page below (1).

1.FORM.ASP
<html>
<head>
<title>Form collection</title>
</head>
<body>
<hr>
<FORM method="POST" action="form_process.asp">
<p> Enter your name here: &nbsp;<input type="text" name="Name" size="15"></p>
<p>What is your Gender: &nbsp;<input type="radio" value="M" name="Gender">M&nbsp;&nbsp;&nbsp;
<input type="radio" name="Gender" value="F">F</p>
<p>in what age group do you belong:<br> &nbsp;<select size="1" name="Age">
<option value="1">Younger than 18</option>
<option value="2">18-26</option>
<option value="3">27-45</option>
<option value="4">46-65</option>
<option value="5">Older than 65</option>
</select></p>
<p>Enter some general comments about what you think about ASP:</p>
<p><textarea rows="5" cols="50" name="Comments"></textarea></</p>


<p align="center"><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>

(2).FORM_PROCESS.ASP

<html>
<head>
<title>Querystring collection</title>
</head>
<body>
<hr>
<p align="left">Name of visitor to Web page: <%=Request.querystring("Name")%></p>
<p align="left">Gender of the vistor: <%=Request.querystring("Gender")%></p>
<p align="left">Age classification of the visitor:<%=Request.querystring("Age")%></p>
<p align="left">Visitor comments: </p><p>
<i><%=Request.querystring("Comments")%></i>
<hr>
</body>
</html>


the second code (2) is the collection page which collects the data from page (1) "form collection", but the page display but no input value values are transmitted.
Nov 9 '06 #1
4 1570
sashi
1,754 Expert 1GB
Hey guys need some advice I have this simple string query code that collects data from the "form collection" page below (1).

1.FORM.ASP
<html>
<head>
<title>Form collection</title>
</head>
<body>
<hr>
<FORM method="POST" action="form_process.asp">
<p> Enter your name here: &nbsp;<input type="text" name="Name" size="15"></p>
<p>What is your Gender: &nbsp;<input type="radio" value="M" name="Gender">M&nbsp;&nbsp;&nbsp;
<input type="radio" name="Gender" value="F">F</p>
<p>in what age group do you belong:<br> &nbsp;<select size="1" name="Age">
<option value="1">Younger than 18</option>
<option value="2">18-26</option>
<option value="3">27-45</option>
<option value="4">46-65</option>
<option value="5">Older than 65</option>
</select></p>
<p>Enter some general comments about what you think about ASP:</p>
<p><textarea rows="5" cols="50" name="Comments"></textarea></</p>


<p align="center"><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>

(2).FORM_PROCESS.ASP

<html>
<head>
<title>Querystring collection</title>
</head>
<body>
<hr>
<p align="left">Name of visitor to Web page: <%=Request.querystring("Name")%></p>
<p align="left">Gender of the vistor: <%=Request.querystring("Gender")%></p>
<p align="left">Age classification of the visitor:<%=Request.querystring("Age")%></p>
<p align="left">Visitor comments: </p><p>
<i><%=Request.querystring("Comments")%></i>
<hr>
</body>
</html>


the second code (2) is the collection page which collects the data from page (1) "form collection", but the page display but no input value values are transmitted.
Hi there,

Kindly refer to below code segment, hope it helps. Good luck & take care.

Expand|Select|Wrap|Line Numbers
  1.   Request.Form("object_name")
  2.  
Nov 9 '06 #2
Hi there,

Kindly refer to below code segment, hope it helps. Good luck & take care.

Expand|Select|Wrap|Line Numbers
  1.   Request.Form("object_name")
  2.  
Thanx sashi but I know that way works but there is a reason why I'm exploring the StringQuery because I'm teaching my self ASP and now I'm up to the file object methods but my none of them work and this issue started from the stringquery.
Nov 9 '06 #3
iam_clint
1,208 Expert 1GB
Thats because your using post method, no Querystring in post method use GET method for that and to retrieve your variable universally just use Request("example")
Nov 9 '06 #4
sashi
1,754 Expert 1GB
Hi there,

As a bonus kindly refer to below attached link for further reading & understanding, hope it helps. Good luck & take care.

http://www.w3schools.com/asp/
Nov 10 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Don Grover | last post by:
In asp how How can i pass a parameter value with a space in the value like this test.asp?catalog=aValue&lineitem=ladies cloths I get a %20 as a space in the browser window, Regards Don
3
by: Nick Truscott | last post by:
<? // scoreinput.php - input a match score when match selected from list ?> <html> <head> <basefont face="Verdana"> </head> <body>
5
by: Aamer Nazir | last post by:
Hi, I am having problems setting the value of a variable in a SQL String that I have to create dynamically in my procedure. The code that I currently have is as follows: set...
3
by: DFS | last post by:
I've been working around this for years (I believe), so I figured someone here might know: Why won't a crosstab query accept a value from a form reference? TRANSFORM...
6
by: Dan V. | last post by:
I would like to create a 2D string list (2D ArrayList ???). I would like to pass in a table or query as a parameter and have both columns transform into a 2D ArrayList. When I sort the one...
3
by: SMG - Idealake | last post by:
Hi All, I have created an application which is working fine and is in about to launch, now suddenly my mgmt says there are chances that Scrip ID( a particular id and not prim key) may have special...
6
by: sara | last post by:
I hope someone can help with this. Our director wants to have a report that will have the departments (Retail stores) across the top, stores down the side and the RANKING of the YTD dept sales...
27
by: user | last post by:
Have require file with several query stings in it. Depending on user input one of strings is selected. Everything going along smoothly until I wanted to also input a variable in string. If I put...
4
by: MLH | last post by:
MyString = "All men are created equal" Debug.PrintLen(MyString) Now that's easy. But how about just counting the letter "e"? Or, if I were curious to know how many commas were in the string....
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.