ASP Query String Collection

  1. The QueryString collection is used to retrieve the variable values in the HTTP query string.
  2. web1.asp
     1<html xmlns="http://www.w3.org/1999/xhtml" >
     2<head runat="server">
     3    <title>Untitled Page</title>
     4</head>
     5<body>
     6    <form id="form1" runat="server">
     7    <div>
     8    <href="web2.asp?txt=this is a query string test">Link with a query string</a>
     9    </div>
    10    </form>
    11</body>
    12</html>
    13
  3. web2.asp
     1<html xmlns="http://www.w3.org/1999/xhtml" >
     2<head runat="server">
     3    <title>Untitled Page</title>
     4</head>
     5<body>
     6    <form id="form1" runat="server">
     7    <div>
     8    <%= request.QueryString("txt"%>
     9    </div>
    10    </form>
    11</body>
    12</html>
    13


     
posted @ 2007-11-02 17:51  许晓光  阅读(297)  评论(0)    收藏  举报