| Mike Brind 2006-04-27, 7:52 am |
|
Dan wrote:
> (Using Classic ASP & MS Access)
>
> I have a page that has 120 fields on it (mostly checkboxes). I cannot
> split this into smaller pages.
>
> So what i want to do is write a class that handles this. in the code it
> would be something like:
>
> Set thisForm = new classBigForm
>
> thisForm.valname = Request.Form("name")
> thisForm.val1 = Request.Form("val1")
> thisForm.val2 = Request.Form("val2")
> thisForm.val3 = Request.Form("val3")
> thisForm.xyz = Request.Form("xyz")
> ....
>
> Writing the class wasn't too bad. But repeating the same code 120
> times, the file got pretty big. Is there a better way to do this
> dynamically?
>
> Also in the same respect to the amount of fields, is there an easy way
> to compare all of these values, so I can run an sql update only on the
> ones i need to?
You'll need to provide a bit more information on the form fields. Are
they all Yes/No options? Or are you providing users with a series of
related options, or groups of related options? How do they map to
database fields?
Also, what is the purpose of your class? Outputting the checkboxes in
html? Data Inserts, updates, deletes?
--
Mike Brind
|