ASP. NET fetch HTML control value
All the value controls inside the HTML form are key=value&key=value& with key values after they are submitted.
This form is submitted to the background.
Radio also, the selected radio value will be passed back to the background, the background with request["Radio name"] to take a value on the line. If the value description is selected.
Such as:
<input type= "Radio" value= "1" name= "Rdo1" checked= "checked"/>a
<input type= "Radio" value= "2" name= "Rdo1"/>b
Background can be value: request["Rdo1"]
Value is: 1
The difference between Request, Request.Form, and Request.QueryString
The request itself is a static object of the system and can itself be called as an array, such as
request ("ABC") is the value that corresponds to the key value "ABC" in the request array, which is not a fixed, but a collection of multiple arrays, which contains
(QueryString, Form, Cookie, clientcertificate,servervariables) These are the values of the array of server variables, that is, by request you can iterate through the arrays and return the corresponding values. It is convenient to use, once and for all.
The member function of Request.Form this request is not so broad, just take the value from the form array, that is, the page form <form> label input unit (such as <input type=text > The value passed over. It is not possible to get the arguments passed in the link string as index.asp?abc=123 in the form.
another way is to request. QueryString ("abc") in this form, you can get the parameters passed by the QueryString link string.
these three methods can be distinguished by several mechanisms for transmitting data in HTTP. Request.Form can get data submitted as a post, requst.querystring can get the data submitted in the Get method, while request can get the data passed by both methods.
in terms of the amount of data passed, Request.Form can pass an unlimited amount of data, while Request.QueryString can only deliver 2k of data.
by speed, request.qeurystring will be slightly faster than Request.Form.
Reference: http://wenku.baidu.com/link?url=-_JE03F398Nb-HjawMBSWDRL6bnZqqKv7E6CKA1YUo5D4fh4_ Fmvdn0b0eprokdcvihzofmzfbtjzusdsqvuqqt48ghjx716u8cqt-w2cr_