CodeAve.com CodeAve.com - ASP - Read/Write
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


Request.Querystring
Passing data between asp documents can be done a number of ways. Querystring is the method that interprets values found in the url. For example a url like this document.asp?u_number=1 will make the variable u_number available to be read by a statement that requests that value <% u_number=request.querystring("u_number") %>. After reading the querystring value u_number (1) is available for use through out the rest of the script.
View the Output
Text View
Print View
Mail this Link
Download the Code

<% 
u_number=request.querystring("u_number")
' assigns the variable u_number to the value
' that u_value contains in the url
u_method=request.querystring("u_method") 
' assigns the variable u_method to the value
' that u_method contains in the url
' in this case u_method signals if the submit
' button was used to input the values
%>

<html>
<title>CodeAve.com(Request.Querystring)</title>
<body bgcolor="#FFFFFF">
<% if u_number <> "" then %>
<p>You entered <%= u_number %></p>
<% if u_method <> "" then %>
<p>You used the submit button</p>
<% else %>
<p>You clicked a link</p>
<% 
end if ' end check for u_number value 
end if ' end check for u_method value %>

<p>
<form action="<%= request.servervariables("script_name") %>" method="get">
<input type="hidden" name="u_method" value="submit">
<select size="1" name="u_number">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<input type="submit" value="Submit">
</form>
</p>
<p>
<a href="<%= request.servervariables("script_name") %>?u_number=1">Link # 1</a>
<br>
<a href="<%= request.servervariables("script_name") %>?u_number=2">Link # 2</a>
<br>
<a href="<%= request.servervariables("script_name") %>?u_number=3">Link # 3</a>
<br>
<a href="<%= request.servervariables("script_name") %>?u_number=4">Link # 4</a>
</p>
</html>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3