ASP Question - Need help in setting Drop Down Box default values 
Author Message
 ASP Question - Need help in setting Drop Down Box default values

Hi,

I currently have a profile form that is used to enter data by a customer.
Once the form is updated and submitted, the database is updated.  Later when
a customer wishes to update their profile, how can I update the drop down
boxes so that it displays the original values that they entered?

I know that I can dynamically recreate all the drop down boxes via a loop
that creates "<option value= xxx>"  and "<option value= xxxx Selected>"
statements, but given the number of drop down boxes and options that seems
like a lot of server side overhead.  Is there an easier way (e.g. a simple
command) to set the default value?

Thanks much in advance,

Peter



Sun, 09 Nov 2003 03:14:21 GMT  
 ASP Question - Need help in setting Drop Down Box default values
u can use cookies to store the values the customer entered, so that next
time the customer wants to edit his profile, you can pre-populate the fields
and pre-select the drop down boxes for him.

Another way to do it is to store the customer's profile information in a
database and pre-populate it with that info when the customer tries to edit
that info. But in order to do this, you have to correctly identify a
customer and pull up his profile (may be take him thru a login page or
something)


Quote:
> Hi,

> I currently have a profile form that is used to enter data by a customer.
> Once the form is updated and submitted, the database is updated.  Later
when
> a customer wishes to update their profile, how can I update the drop down
> boxes so that it displays the original values that they entered?

> I know that I can dynamically recreate all the drop down boxes via a loop
> that creates "<option value= xxx>"  and "<option value= xxxx Selected>"
> statements, but given the number of drop down boxes and options that seems
> like a lot of server side overhead.  Is there an easier way (e.g. a simple
> command) to set the default value?

> Thanks much in advance,

> Peter



Sun, 09 Nov 2003 07:22:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. novice question: need help with drop down box

2. value of a drop down box Pls help

3. Drop down box - Logic help needed.

4. Specify default drop down value?

5. How to set default month in a drop-down to current month

6. Drop Down List Box - Drop Down portion does not always disappear after Click event

7. Dynamic default values for parameter drop down lists

8. Value from Drop down box

9. one drop down box dependant on selected value of another

10. reading values of a menu/drop down box

11. reading values of drop down box

12. Can I have dynamic values on drop down box

 

 
Powered by phpBB® Forum Software