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

Casey Crookston caseyc at IntelliSoftmn.com
Wed Nov 29 12:21:45 CST 2006

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 = "<table width='300'>"
For i = 1 To (Request.Form.Count - 2)
	form_item = Request.Form.AllKeys(i).Replace("_", "&nbsp;")
	form_value = Request.Form(i)
	lbl_submit.Text &= "<tr><td>" & form_item & ": </td><td>" &
form_value & "</td></tr>"
Next i
lbl_submit.Text &= "</table>"



More information about the thelist mailing list