What are the ways to retrieve data submitted to the web server from a form in the client HTML in ASP.NET?
A:
In VB.NET
For POST requests:
value = Request.Form("formElementID")
For GET requests:
value = Request.QueryString("formElementID")
Adam
2008-08-27 18:17:29
+1
A:
You can also search through both the Form and QueryString collections at the same time so that the data will be found regardless of the the request method.
value = Request("formElementID")
palehorse
2008-08-27 18:19:20
A:
Note, everything about the request is available in the request, check out the Request class, you'll be amazed how much information is actually available to you.
Rob Cooper
2008-08-27 19:01:09