473,387 Members | 1,425 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,387 software developers and data experts.

HTML ListBox issues

I have a HTML list box created and I am trying to access the selected values on the PostBack. However I am only getting one value back from the list box.

<TD ID='TDDescription'>
<SELECT NAME='Description' Class='RegText' isrequired=Yes Multiple=True Size=6 divname='Non-FatalCorrected'>
<OPTION Value='aa' >aa</OPTION>
<OPTION Value='bb' >bb</OPTION>
<OPTION Value='cc' >cc</OPTION>
<OPTION Value='dd' >dd</OPTION>
<OPTION Value='ee' >ee</OPTION>
</SELECT> </TD></TR></Table></Div></td>

In the code behind I have:
Dim aString As String = Request.Form("Description")

I expected to get the results back as "aa,bb,cc,dd,ee" if all the results were selected. However I am only getting back "aa".

Any ideas?
Jul 10 '08 #1
7 1397
Plater
7,872 Expert 4TB
Have you cycled through everything in the Request.Form collection to see what all you are getting?
Jul 10 '08 #2
kunal pawar
297 100+
I suppose

u have to give id attribute to HTML list box and then check ur form method is post or Get

Another thing try using Request("Description") it will give both value from Querystring and form
Jul 11 '08 #3
I have tried all of the suggestions.

Actually I was able to pin it down to the "divname" statement.

EVERYTHING works in IE6, but it does not work in IE7.

In IE7 if I remove the "divname" tag then the multiple selection works. However I need the divname for my javascript validation.

Any suggestions?
Jul 11 '08 #4
Have you cycled through everything in the Request.Form collection to see what all you are getting?

Yes. Only one entry (the first selection on the list) shows.


I also tried using a standard HTML attribute such as "lang" and "title", but no matter what it still only returns one selection.
Jul 11 '08 #5
Plater
7,872 Expert 4TB
What is the "divname" attribute? I don't think I've ever heard of it before?
Jul 11 '08 #6
It was a custom attribute that they used to store information in.

What I did was change divname to lang and hid the information in it.

It seems to be working now.

Thanks all for all your help.
Jul 11 '08 #7
Plater
7,872 Expert 4TB
I was going to say, IE doesn't like to handle incorrect markup. Combine that with incorrect DocTypes and things get a little funny.
Jul 11 '08 #8

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

Similar topics

1
by: Annette Massie | last post by:
I would like to have a form that lists current addresses being used. On this form I would also like to have a command button that would allow the user to add an address if they do not see it...
3
by: Michael | last post by:
I am attempting to write a database for non-profit that I am working with. I have some limited (academic) experience with Access. I'm having some trouble with a listbox on one of my forms. Access...
2
by: JoeHenrich | last post by:
I am using VS.NET 2003 and am having an interesting issue with a Listbox control. Essentially, I have a form with a listbox on it. In the listbox doubleclick event I would like to do some...
4
by: James Radke | last post by:
Hello, I am creating an owner draw listbox for a windows application. It is all working, except the performance is significantly slower than the standard listbox. Basically what I have done is...
2
by: dan heskett | last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some custom "fields" and text layout. Essentially it works, but I must be missing something big, conceptually, because I...
1
by: BillAtWork | last post by:
Hi, I have a listbox (in a user control) which has items add/removed via javascript (i.e. an "add item" link which uses a popup selection screen to add items and a "remove item" link which deletes...
6
by: BerkshireGuy | last post by:
On an unbound form, I have a combobox called 'cboproducttype' and a text box called 'txtamountappliedfor'. I have an Add button that I would like the user to be able to hit once a product and...
1
by: stimul8d | last post by:
okay; ASP. I have i listbox inside a user control which is dynamically created on page_init. I check for postback and only populate the datasource if it's false. regardless, i do this ...
3
by: juing | last post by:
Hi Guys, is it possible to create an instance of ListBox programatically? Actually I have two issues here: 1.) When I type this line in Access 2003: Dim tmpList As ListBox Set tmpList = New...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...

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.