473,405 Members | 2,272 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,405 software developers and data experts.

Listbox set to single not working

I have the following listbox:

<asp:ListBox ID="Positions" SelectionMode="single" Rows="8" Width="600"
runat="server"/>

I also have the following traces:

trace.warn("Positions.SelectedValue = " & Positions.SelectedValue)
trace.warn("Positions.SelectedIndex = " & Positions.SelectedIndex)

I am getting

Positions.SelectedValue = 0.001767 0.001342
Positions.SelectedIndex = -1 0.001798 0.000030
If I select an item and want to send the value to a stored procedure, I am
finding the selection getting unselected, and therefore I get an error.
When it posts back it shows it unselected.

If I set the SelectionMode to "Multiple", it works fine. It will grab the
lowest selectedItem and use that. When it posts back whatever was selected
is still selected. Why is the "Single" mode not working?

Thanks,

Tom
Jan 13 '06 #1
0 981

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
2
by: Luna | last post by:
Hi, I want to pass the values that have been chosen from a few comboboxes into a listbox as a single entry. how do i do this?? this is what i tried... it will probably give u some...
2
by: amber | last post by:
Hello I'm keeping this list busy! : Okay, now I'm trying to clear a listbox The way I have it set up, the user can either enter a value into a textbox, then hit a button, and 1 specific record is...
4
by: lgbjr | last post by:
Hi All, I've got a listbox on a VB.NET form. when the form opens, the ListBox SelectionMode is set to Single. while running various routines on the form, items get added to the list box (results...
3
by: Ali Chambers | last post by:
Hi, I have created a listbox called "dtlist1" on my VB.NET form. I call a procedure as follows: Private Sub openfile(flname As String) dtlist1.Items.Clear() etc..
11
by: MrQuan | last post by:
I must say, I'm completly stumped at what should be a very simple sub... It's purpose is to fill a ListBox with filenames from the path specified. I know Files() receives the filenames, however...
18
by: Zytan | last post by:
I want the same function to be run whether you press Enter or double click the listbox. It seems really verbose to write both handlers to both events everytime, even if they both call the same...
6
by: AB | last post by:
Hi, I have a listbox and a webbrowser control. For each single item selected I am generating a different web page. However for more than one selection, a common web page gets generated. I...
0
by: yatinindianic | last post by:
my code is like that listBox = new ListBox(currentShell, SWT.SINGLE | SWT.V_SCROLL, ListBox.LB_STYLE_NO_HEADING_TEXT | ListBox.LB_MOD_SHOW_DETAIL_ICONS); font23 = new...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.