Difference between Request.Form and Request.QueryString?
Manoj Kalla
Request.Form =========== 1. HTTP request method is POST, the user submitted data is in the Request.Form() collection. 2. Request.Form the data is posted in http header.Request.QueryString ================ 1. HTTP request method is GET, then user submitted data is in the Request.QueryString() collection. 2. QueryString data is sent through url.
Difference between Request.Form and Request.QueryString are given below: First of all whenever we talking about Request.Form it is realized me 1.If the HTTP request method is POST, the user submitted data is in the Request.Form() collection. 2. The value of Request.Form(element) is an array of all the values of element that occur in the request body. You can determine the number of values of a parameter by calling Request.Form(element).Count. If a parameter does not have multiple values associated with it, the count is 1. If the parameter is not found, the count is 0. 3.The Form collection retrieves the values of form elements posted to the HTTP request body, Only those elements and value which exist in your Form. 4.Request.Form - means you are wanting to retrieve the values for the form that was posted.and whenever we talk about Request.QueryString it is realized me 1.If the HTTP request method is GET, then user submitted data is in the Request.QueryString() collection. 2.The value of Request.QueryString(parameter) is an array of all of the values of parameter that occur in QUERY_STRING. You can determine the number of values of a parameter by calling Request.QueryString(parameter).Count. If a variable does not have multiple data sets associated with it, the count is 1. If the variable is not found, the count is 0. 3.The QueryString collection retrieves the values of the variables in the HTTP query string, Here you can append any of your custom variable and value which event dose not exist in your Form. 4.Request.QueryString - means you are wanting to retrieve values that have been passed on the querystring.
In Request.Form the data is posted in http header whereas in QueryString data is sent through url.
gud
http://www.sitepoint.com/forums/showthread.php?46086-Difference-between-Request-and-Request-QueryString http://stackoverflow.com/questions/20697272/difference-between-request-form-and-request-querystring
generally: Request.Form - means you are wanting to retrieve the values for the form that was posted.Request.QueryString - means you are wanting to retrieve values that have been passed on the querystring.
Request.Form meant for accessing the values posted from referal page.
Request.Form to pick the control value from web form and Request.queryString is used to pick the value from querystring that is passed through page url.
Request.Form - means you are wanting to retrieve the values for the form that was posted.Request.QueryString - means you are wanting to retrieve values that have been passed on the querystring.
Request.Form - It's use to access the control value from mvc view to controller end. Request.Querystring- It's the url parameter which can be used to pass the value from one page to other page
Request.QueryString is a visible variable values passed with url where as Request.Form is a collection which can be accessed by Post method in a .net page.
Request.Form is used for accessing the value on post back of form and Request.QueryString is used for accessing the value passes in url as a parameter.
yrt
If the HTTP request method is POST, the user submitted data is in the Request.Form() collectionIf the HTTP request method is GET, then user submitted data is in the Request.QueryString() collection
Request.Form the data is posted in http header QueryString data is sent through url.
Request.Form (POST method of HTTP Request) 1. Post through HTTP Header i.e., request body 2. Not visible on browser address bar 3. Can post any data eg., uploaded fileRequest.Query (GET method of HTTP Request) 1. Sent through URL 2. As it is appended to the url, it is visible in the browser address bar 3. It has length limitations.
In Request.Form the data is posted in http header whereas in Request.QueryString data is sent through url.
In Request.Form the data is posted in http header whereas in QueryString data is sent through url. You can see below link also for same http://stackoverflow.com/questions/20697272/difference-between-request-form-and-request-querystring
Request.Form handles null values.Request.QueryString doesn't handles null values.
In Request.Querystring you need to encrypt for senstive data and it doesnt allow any special characters like(#$%^&*()_+~) except (!@). You need to encrypt to pass special characters from querystring. Where in Request.Form allows all kinds of data with out any encryption. Querystring will not handle null values, but Request.Form can handle it.