views:

108

answers:

3

Hi,

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

I need this sub to retrieve the values that were filled in on the form, but the things I need to retrieve values from are not asp controls, they are simple <input> and <select> tags.

How can I retrieve values from input on a .aspx page from VB code executed behind it?

+1  A: 

Use the Request.Form object for POST. Or the Request.QueryString for GET.

squillman
+2  A: 

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 you sub, you must use the request object. More infos here : http://msdn.microsoft.com/en-us/library/aa231199(VS.60).aspx

Hope this help you ;)

Fox
+1  A: 

Your HTML

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

Your VB.NET

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