Last post Jan 15, 2018 09:38 AM by Mikesdotnetting
Jan 15, 2018 09:22 AM|exam32|LINK
I know the equivalent of PHP $_GET["param"] is Request.Query["param"].
The equivalent of PHP $_POST["param"] is Request.Form["param"]
but what is the equivalent of PHP $_REQUEST ? i mean looking both in GET and POST ?
Jan 15, 2018 09:38 AM|Mikesdotnetting|LINK
If you are working with ASP.NET Core, you have to specify the collection that you want to retrieve data from. E.g Request.Form or Request.Query*. In other versions of ASP.NET, Request["param"] works and will check each of the collections in turn: Form, Query,
*You are actually better of using model binding rather than referencing the Request collections explicitly.