Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

List Box and ASP

Posted on 1999-07-13
2
Medium Priority
?
150 Views
Last Modified: 2013-12-25
OK,

I populate a list box using a recordset. Pretty straight forward.
Its in a form that uses a combination of listboxes and text boxes.
When the user forgets essential information the form will return itself and an error message. Any information that has been entered will be passed back into the form using Request.Form("Variable") so that the user doesn't have to fill it out again.
OK, my question is how do I do this with my drop-down while still allowing the user to reselect if they made a mistake.
0
Comment
Question by:Jasson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 200 total points
ID: 1864036
when you are creating your SELECT items from the record set do this:

<%
DropDown = Request("DropDown")

do while no RS.EOF
  curItem = rs("fieldname")
  response.write <OPTION VALUE=" & CurItem
  if CurItem = DropDown then response.write " SELECTED"
  response.write ">" & CurItem & "</OPTION>"
RS.MoveNext
loop
%>

0
 

Author Comment

by:Jasson
ID: 1864037
Thanks Mat.

Forgetting my html. Need to stop using Interdev and go back to notepad.

Got another one as well. See the PASSING MULTIPLE VALUES USING A DROP DOWN.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question