PDA

Click to See Complete Forum and Search --> : Filling a form


parkes
Nov 7th, 2000, 08:44 AM
I'm using ASP.

I've got a form with a drop down list at the top from which you can select one option only. This works fine, but what I need to be able to do, is once I've selected an option is to read a database and fill in the rest of the fields on the same page.

Help how is this done as I'm failry new to the ASP side of things

dadames
Nov 7th, 2000, 09:58 AM
see
http://www.asp101.com/samples/form_to_db.asp

Many other great samples here.

monte96
Nov 7th, 2000, 10:20 AM
Unless you have all possible values loaded into client side arrays, you will need to pass the selected value back to the page as a querystring and populate the recordset only if the querystring is passed.
I would then say throw it into an array using the GetRows method of the recordset and populate the fields using the array.
You'd probably want to either set a flag indicating that a selection has been made or check array bounds so your code doesn't try to access the array when it is empty(On the initial page load)