Adam
Adam

Reputation: 28848

How do I retrieve data sent to the web server in ASP.NET?

What are the ways to retrieve data submitted to the web server from a form in the client HTML in ASP.NET?

Upvotes: 0

Views: 225

Answers (2)

palehorse
palehorse

Reputation: 27476

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")

Upvotes: 4

Adam
Adam

Reputation: 28848

In VB.NET

For POST requests:

value = Request.Form("formElementID")

For GET requests:

value = Request.QueryString("formElementID")

Upvotes: 0

Related Questions