Error getting form values ​​from VB

I created a module for my website and when the button is clicked it calls on the VB server.

I need this sub to get the values ​​that have been filled in the form, but the things I need to retrieve the values ​​are not asp controls, they are simple tags <input>

and <select>

.

How can I get the values ​​from the input on the .aspx page from the VB code executed behind it?

+1


source to share


3 answers


There you go: http://www.geekpedia.com/KB16_How-do-I-get-the-values-when-submitting-a-form-(either-using-GET-or-POST).html

In your sub, you must use a request object. More info here: http://msdn.microsoft.com/en-us/library/aa231199(VS.60).aspx



Hope it helps you;)

+4


source


Your HTML

<input id="firstName" name="firstName />

      



Your VB.NET

Dim firstName as String = Request.Form("firstName")

      

+3


source


Use Request.Form object

for POST. Or Request.QueryString

for GET.

+1


source







All Articles