codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ASP Dropdown Box  Archive Import (Simon) at 10:02 on Thursday, September 26, 2002
 

I have a dropdown box with 4 options to choose from,once the chosen option is submitted it shows up in the table with the option I selected but when I go back into the record it defaults back to the first option in the dropdown list ie Manchester.
Here's my code

Response.Write "<option>Manchester</option>"
Response.Write "<option>Leeds</option>"
Response.Write "<option>London</option>"
Response.Write "<option>UNKNOWN</option>"




  Re: ASP Dropdown Box  Archive Import (Mark Deibert) at 08:56 on Tuesday, October 08, 2002
 

You mean when you submit the form, you get the option you selected as expected, but when you reload the form the top option is selected? If so, that's normal. If no option has the "Selected" attrib, the first becomes the default. Do I follow you?

MD :-)

  Re: ASP Dropdown Box  Archive Import (Andres Berger) at 05:58 on Saturday, March 08, 2003
 

If you want that your dropdown menu "remember" his state, then you must save it in a variable when ou submit your page, and instead of using HTML to write your dropdown menu use ASP and check the variable so you can decide in what line you activate the "checked" feature.

Regards

<<< ------------------------------------------ >>>
Andres Berger Garcia -- Marketing Manager
www.MicroWebHost.com
Minisite Hosting $9.95 Yearly
<<< ------------------------------------------ >>>

  Re: ASP Dropdown Box  Archive Import (Andres Berger) at 05:59 on Saturday, March 08, 2003
 

<<< ------------------------------------------ >>>
Andres Berger Garcia -- Marketing Manager
<a href="http://www.MicroWebHost.com">www.MicroWebHost.com</a>
Minisite Hosting $9.95 Yearly
<<< ------------------------------------------ >>>








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: C++ Beginner question
•  Re: function within loop problem
•  moncler outlet
•  Re: Display swf file in pdf
•  Re: how to create forum using asp.net with c# language?
•  Discount coach store
•  Create Better Maps with Global Mapper
•  Re: How to display a message box when record is temporary stored in session/grid view
•  Sharing object in perl


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012