Form (Request オブジェクト)
Request.Form( key )
Request.Form( index )
cnt = Request.Form.Count
Request.Form( index )
cnt = Request.Form.Count
引数
- key
- 値を取得するフォーム要素の名前です。
- Index
- 値を取得するフォーム要素の番号です。1以上の指定可能です。
- cnt
- フォーム要素数を取得します。
解説
フォーム要素の値を取得します。
Formタグ内にあるInput要素のValue値を取得します。
<form>
<input type="text" name="txtname" value="999">
</form>
というFormが送信された場合、Request.Form("txtname")で 999 を取得できます。
使用例
s1 = Request.Form("txtInput") s2 = Request.Form(1)
関連項目
Cookies | cookie の値を取得します。 |
QueryString | クエリ文字列内の変数の値を取得します。 |
ServerVariables | 定義済み環境変数の値です。 |
TotalBytes | クライアントが要求し、送信した合計バイト数を取得します。 |