web 2.0

How to use ASP & Method GET

How to use ASP & Method GET Learn and tutorial asp and read variable from asp and send data method GET

ShotDev Focus:
- ASP & Read variable from method get

Example

asp_get1.asp


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form action="asp_get2.asp" method="get" name="form1">
Name
<input name="txtName" type="text">
Site
<input name="txtSite" type="text">
<input name="btnSubmit" type="submit" value="Submit">
</form>
<br>
<a href="asp_get2.asp?txtName=Weerachai Nukitram&txtSite=ShotDev.Com">URL Link</a>
</body>
</html>

asp_get2.asp


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Response.Write Request.QueryString("txtName")
Response.write "<br>"
Response.Write Request.QueryString("txtSite")

Response.write "<hr>"

'*** Read all method get ***'
For Each myVar in Request.QueryString
Response.write(Request.QueryString(myVar) & "<br>")
Next
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_get1.asp

Screenshot

ASP & Method get

ASP & Method get

.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (3 votes, average: 4.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.