Default Select List

R

rn5a

During registration, users have to provide their date of birth. For
the date & month part, there are 2 dropdown lists & for the year,
there's a textbox. These 3 fields are finally merged together to
populate a MS-Access database table in a column named DOB whose data
type is Date/Time.

There's another page named, say, MyPage.asp, in the same application
where users have to again enter their date of birth. Like the
registration page, here too there are 2 dropdown lists for the date &
month part & a textbox for the year part.

Assuming that a user has already registered, when he comes MyPage.asp
(which again has the date of birth fields), I don't want to make the
user enter the same info again. Rather I would retrieve his date of
birth from the DB table & populate the 2 dropdown lists with the date
& month & populate the textbox with the year.

Assume that the user's date of birth is 22/10/1980 (dd/mm/yyyy
format). Populating the year 1980 in the textbox is not a problem. The
problem is how do I ensure that when this user comes to MyPage.asp,
the date dropdown list selects 22 by default & the month dropdown list
selects October by default.

With what do I compare the date & month values that have been
retrieved from the DB table so that the 2 dropdown lists select the
correct option by default?

Note that in the DB table, dates are in the same format as shown above
but in the ASP page, the month dropdown list is populated with
January, February, March, April, May etc. & not 1, 2, 3, 4, 5 etc.
 
R

rn5a

During registration, users have to provide their date of birth. For
the date & month part, there are 2 dropdown lists & for the year,
there's a textbox. These 3 fields are finally merged together to
populate a MS-Access database table in a column named DOB whose data
type is Date/Time.

There's another page named, say, MyPage.asp, in the same application
where users have to again enter their date of birth. Like the
registration page, here too there are 2 dropdown lists for the date &
month part & a textbox for the year part.

Assuming that a user has already registered, when he comes MyPage.asp
(which again has the date of birth fields), I don't want to make the
user enter the same info again. Rather I would retrieve his date of
birth from the DB table & populate the 2 dropdown lists with the date
& month & populate the textbox with the year.

Assume that the user's date of birth is 22/10/1980 (dd/mm/yyyy
format). Populating the year 1980 in the textbox is not a problem. The
problem is how do I ensure that when this user comes to MyPage.asp,
the date dropdown list selects 22 by default & the month dropdown list
selects October by default.

With what do I compare the date & month values that have been
retrieved from the DB table so that the 2 dropdown lists select the
correct option by default?

Note that in the DB table, dates are in the same format as shown above
but in the ASP page, the month dropdown list is populated with
January, February, March, April, May etc. & not 1, 2, 3, 4, 5 etc.

OK....I got it.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top