[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 796
  • Last Modified:

Difference between Request("X") and Request.Param("X") in ASP / ASP.NET !!

Hi,

Can you please let me know what is the difference between

Request("X") and Request.Param("X")

I think so this is a basic question in classical ASP or ASP.NET but need some good explanation. Appreciate your time and patience !!

Thanks
0
kishore_peddi
Asked:
kishore_peddi
1 Solution
 
GawaiCommented:
Request("X") = will accept irrespective of form method get /post
and
Request.Param("X") is only for post method.


0
 
kishore_peddiAuthor Commented:
Then...Can you please explain me what is the difference between

Request.Form("X")   and   Request.Param("X")  =>  as both are  only for post method .... Am i correct ? Please correct me if i am wrong !!
0
 
Bob LearnedCommented:
Put simply, Params is a combination of QueryString, Form, ServerVariables, and Cookies items, while Form is just the form variables.  In the example you showed, there realistically isn't any difference, but there can be Params values that are not in the Form collection.

Bob
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now