ASP.NET equivalent to PHP $ _GET and $ _POST?

As the title says.

I am new to asp.net and I am trying to compile some AJAX materials for study.

+4
source share
4 answers

ASP.Net AJAX can also be read, as there are some built-in things that may be useful.

"Request.QueryString" and "Request.Form" are likely answers to the title question.

+5
source

After the marr75 response, the Request property provides a dictionary of the GETed and POSTed variables.

+1
source

See http://msdn.microsoft.com/en-us/library/swe97x0b.aspx .

It explains how to access the response and request context. If you are planning on making ajax material, you may need to think about WCF REST, in which case it is completely different, and I would recommend going through some tutorials to see how the elements of the application’s http application are distracted. In any case, in many ASP.NET projects, you do not touch the context of the response and request directly.

0
source

Request request object is a map of all request headers - both from a POST request, and for URLs:

 //This will retrieve the value of "SomeHeader" from the request //eg http://localhost/page.aspx?SomeHeader=thisisvalue string value = HttpContext.Current.Request["SomeHeader"]; //value == "thisisvalue" 
0
source

All Articles