[thelist] Need name for use in Dyanically generated field name in ASP

Volkan Özçelik volkan.ozcelik at gmail.com
Tue Feb 26 12:39:28 CST 2008

Hi Michelle

On Tue, Feb 26, 2008 at 6:45 PM, Michele Foster <foster.michele at gmail.com>

> However, for the dynamically generated fields, I can't seem to get ASP to
> let me use the field name dynamically in an If statement so that I can
> indicate if the field was checked or not. i.e.

When the user agent submits the form the server received **only** the
selected/checked input field values.

For instance, for the form:
<input type="radio" name="group1" value="radio1" id="g1_r1"  />
<input type="radio" name="group1" value="radio2" id="g1_r2"  />
<input type="radio" name="group2" value="radio1" id="g2_r1"  />
<input type="radio" name="group2" value="radio2" id="g2_r2"  />

if g1_r2 radiobutton is checked the Request.Form collection will not have
similarly if g2_r2 is checked, the Request.Form collection will not have

thus in the above scenario,
Request.Form["group1"] will return "radio1" and
Request.Form["group2"] will (again) return "radio1" (the syntax is C#
ASP.net, but it's quite similar in classic ASP)

Which means that the second options (radio2) in each radio button group is
not checked.


In short anything you did not receive in the Request collection, and hence
you cannot iterate, is unchecked.

Hope that makes sense,
Volkan Ozcelik
+> linkibol.com - in seek for quality links : http://www.linkibol.com/
+> Going solo in Turkish: http://www.fikribol.com/donkisot/
+> My projects/studies/trials/errors : http://www.sarmal.com/
+> Sardalya JavaScript Library: http://www.sarmal.com/sardalya/

More information about the thelist mailing list