473,396 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I hold the selected value from a dropdown list?

tsubasa
64
I have a dropdown list that is populated from a table in a database. Once the form is submitted error checking will take place. The data in the dropdownlist is clearing, while all the data in the textboxes is remaining. How can I hold the value of the dropdownlist selection?

Thanks in advance, Tsu.


Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.               <td width="10%">&nbsp;</td>
  3.               <td width="80%" colspan="5">
  4.               <select name="organization" size="1">
  5.            <%
  6.           'Open database get state taxes.
  7.           set rs=openrs("SELECT * FROM aotable ORDER BY id")
  8.           if not rs.eof then
  9.             rs.movefirst
  10.             while not rs.eof
  11.             tempstate=rs("aounit")
  12.             tempabbr=rs("ao")
  13.                    %>
  14.               <option class="formfield"<%=tempsel%> value="<%=tempabbr%>"><%=tempstate%></option>
  15.                 <%
  16.             rs.movenext
  17.             wend
  18.           end if
  19.           rs.close
  20.           set rs=nothing
  21.          %>    
  22.               </select>*</td>
  23.               <td width="10%">&nbsp;</td>
  24.             </tr>
  25.  
Jul 26 '10 #1

✓ answered by tsubasa

Can someone close this question, I found the answer on the Internet. Thank you!

-Tsu

1 1988
tsubasa
64
Can someone close this question, I found the answer on the Internet. Thank you!

-Tsu
Jul 27 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
5
by: Kris Rockwell | last post by:
Hello (again), I have gotten the dropdown list functionality to work through a few tricks (probably not the most efficient, but it works) but I am not sure how to set the default selected value....
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
1
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in...
5
by: SA SA | last post by:
Is this possible? I have three items in drop down "Select Payment Type", "Credit Card" and "Check". if user select Credit card then i need to post the form variables to different URL than check...
6
by: yasodhai | last post by:
Hi, I used a dropdown control which is binded to a datagrid control. I passed the values to the dropdownlist from the database using a function as follows in the aspx itself. <asp:DropDownList...
1
by: shiva srivastava | last post by:
can i select more than one option in DropDownList? if yes then what is the code for this in vb.net? plz reply.
5
parshupooja
by: parshupooja | last post by:
Hello, I am using asp.net C# I have a form which has various controls such as Dropdownlist, textboxes. If user select value"10" or "13' from drop down than textbox field should become mandatory,...
4
by: semomaniz | last post by:
I have a list box that has a list of roles defined. List of roles are binded to the list box in page load event. I am trying to retrieve the selected role from the text box but i am getting a null...
1
by: AarthiVedhavalli | last post by:
Hi, In my C# web application I have a list box whic is binded to database. What i need now is , if i double click a value in list box that vale should be added to a dropdown list.. Any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.