[thelist] .NET: help with a form parsing script

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Wed Nov 29 13:21:12 CST 2006

		Hi Casey,

   The NAME attribute of .NET controls tends to be delimited with colons rather than with underscore characters.  Since the name is always the key associated with a control's value in Request.Form, you'll need to replace the colon rather than the underscore.



				From: "Casey Crookston" caseyc at IntelliSoftmn.com

I made a little script which parses a form submission. It does a good
job with text boxes and radio button lists, but I'm having trouble with
check box lists. A sample of the form is here:


If you fill it out (with dummy data) and hit submit, you'll notice that
the check boxes render as: "How:2 on" instead of showing the actual
values, as it does with the radio buttons. 

Here's the code with parses the script:

Dim i As Integer
Dim form_item as string
Dim form_value as string
lbl_submit.Text = "

For i = 1 To (Request.Form.Count - 2)
form_item = Request.Form.AllKeys(i).Replace("_", " ")
form_value = Request.Form(i)
lbl_submit.Text &= "
" & form_item & ": 	 " &
form_value & "	 
Next i
lbl_submit.Text &= "



More information about the thelist mailing list