QueryString (Request オブジェクト)
Request.QueryString( key )
Request.QueryString( index )
cnt = Request.QueryString.Count
Request.QueryString( index )
cnt = Request.QueryString.Count
引数
- key
- 値を取得するクエリ文字列内の変数の名前です。
- Index
- 値を取得するクエリ文字列内の変数の番号です。1以上の指定可能です。
- cnt
- フォーム要素数を取得します。
解説
クエリ文字列内の変数の値を取得します。
クエリ文字列とは、URLに与えるパラメータのことです。
a.asp?aaa=1&bbb=1
という要求をした場合、a.asp で s = Request.QueryString("aaa") とすると
s には 1 が入ります。
使用例
s1 = Request.QueryString("txtInput") s2 = Request.QueryString(1)
関連項目
Cookies | cookie の値を取得します。 |
Form | フォーム要素の値を取得します。 |
ServerVariables | 定義済み環境変数の値です。 |
TotalBytes | クライアントが要求し、送信した合計バイト数を取得します。 |