473,396 Members | 2,139 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.

Setting a default option in a combo box for ASP 3.0 app

How do I make a value the default value for a combo box in ASP 3.0? What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself, but not if I use it in a ASP 3.0 app) I have also seen messages in this forum that says it should work, but I've tried it two different asp 3.0 apps and it is not working and I don't know why.

<select name="cboCompany" style="text-align:right; font-size:8pt">
<option value="08">08</option>
<option value="09" selected="true">09</option>
<option value="33">33</option>
<option value="18">18</option>
<option value="17">17</option>
</select>
Feb 25 '07 #1
1 1642
jhardman
3,406 Expert 2GB
<select name="cboCompany" style="text-align:right; font-size:8pt">
<option value="08">08</option>
<option value="09" selected="true">09</option>
<option value="33">33</option>
<option value="18">18</option>
<option value="17">17</option>
</select>
try:
Expand|Select|Wrap|Line Numbers
  1.     <option value="09" selected>09</option> 
  2.  
I don't see why using asp should make a difference, but check the source code from the browser to make sure the asp is putting out the right HTML code.

Let me know if this works.

Jared
Feb 26 '07 #2

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

Similar topics

5
by: Harry Haller | last post by:
<select name="cboPlaces" id="cboPlaces"> <option value="3">Countryside</option> <option value="4">Forest</option> <option value="5">Mountain</option> <option value="6">Desert</option> <option...
2
by: Rani | last post by:
guys I've created 3 combo boxes for a month date and a year how do I set the value to be the default date ? is there a more suphisticated way to do so ? herein is the code i am using <select...
1
by: Robert | last post by:
I borrowed one of the forms from the MS Access Solutions database and altered it to fit my needs. The form was the 'EditProducts' form where you select a category from a combo which then populates...
3
by: Dave | last post by:
I would like to have the word "Select" as the default option in a combo box that will retrieve its data from database. I also would like to have the ability to validate the combo box to ensure that...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: sangram | last post by:
how to select a default value of combo box in run time, i have select some value from database ,depending on this i have to set the value of combox box... advance thanks..
12
by: Doogie | last post by:
How do I make a value the default value for a combo box in ASP 3.0? What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself,...
4
by: Doogie | last post by:
I posted this question a few days ago but I think that post is drying up and I still do not have an answer. I need to set a default option for a combo box that is not the first item in that combo...
7
by: Orv | last post by:
I have a "Yes/No" combo box (set to required) and I want the focus to shift to differnet controls (on the same form) based on the selection of "Yes" or "No". Would this have to be placed on the...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.