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

Get values from the listbox using vb.net

Hi,
I am using .net 2.0. I have a .aspx page with vb.net as codebehind.

My form has one dropdown, 2 listboxes with add & remove button. During pageload I am loading all the values from the db to dropdown and after pageload, If I select value from the dropdown will load the data into the first listbox.
I can select 1 or multiple values in the listbox and click on Add button will copy the data from source listbox to destination.
Now how do I get all the values in the listbox using vb.net code ?

Note: NOT the selected value. But I need all the values in the second listbox.

Thanks,
Kanda.
Mar 24 '08 #1
3 3735
malav123
217 100+
Hi,
I am using .net 2.0. I have a .aspx page with vb.net as codebehind.

My form has one dropdown, 2 listboxes with add & remove button. During pageload I am loading all the values from the db to dropdown and after pageload, If I select value from the dropdown will load the data into the first listbox.
I can select 1 or multiple values in the listbox and click on Add button will copy the data from source listbox to destination.
Now how do I get all the values in the listbox using vb.net code ?

Note: NOT the selected value. But I need all the values in the second listbox.

Thanks,
Kanda.
You can use java script for listbox manipulation... by usign java script you can accomplish your task.........
Mar 24 '08 #2
Frinavale
9,735 Expert Mod 8TB
Hi,
I am using .net 2.0. I have a .aspx page with vb.net as codebehind.

My form has one dropdown, 2 listboxes with add & remove button. During pageload I am loading all the values from the db to dropdown and after pageload, If I select value from the dropdown will load the data into the first listbox.
I can select 1 or multiple values in the listbox and click on Add button will copy the data from source listbox to destination.
Now how do I get all the values in the listbox using vb.net code ?

Note: NOT the selected value. But I need all the values in the second listbox.

Thanks,
Kanda.
Hi Renikumar,

Check out the ListBox Class and the article listed there on How to Determine the Selection in List Web Server Controls. Using these two sources I'm sure you'll find your answer.

Cheers!

-Frinny
Mar 24 '08 #3
It helped me..Thanks a lot.
Mar 24 '08 #4

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

Similar topics

7
by: Dave Hopper | last post by:
Hi I posted a question recently regarding problems I am having getting a value from a list box to use in a query. I got a lot of help, for which I thank you and it's nearly working! But I need...
1
by: dburns | last post by:
I have an unbound ListBox and an unbound ComboBox on the same form. I have them both set up to display the values from the same field in the same table. The ListBox displays the correct values; the...
6
by: Janaka | last post by:
Help! I have two ListBox controls on my web form. The first one gets populated on entry with values from the DB. I then use JavaScript to copy options from this ListBox to my second one. (I...
6
by: Niggy | last post by:
Hi there, I would like to display the values of the index as chosen by the user in a listbox. These values would be as per the datavaluefield. On testing I get a value of -1: Private Sub...
0
by: Dave | last post by:
Hi all, I have a listbox that is complex bound by an arraylist. The problem is that when I delete an object from the arraylist, the listbox does not reflect those changes. I tried refreshing...
3
by: Richard Albrecht | last post by:
I have been trying to figure out for days on how to read values from a Bound ListBox. The listBox gets the values from an Access Table. I can read values fine for Non-Bound ListBoxes, But the...
7
by: technocraze | last post by:
Hi guys, I encountered this error while using the AfterUpdate event for my listbox. Error: Update or CancelUpdate without using AddNew or Edit. What i wanted to achieve is just to display the...
6
by: Pippen | last post by:
Hi, I'm trying to read all the selected items in a ListBox. So after the user selects the values they want in the ListBox they select a button. This is where I want to put into a string all the...
9
by: Ajinkya | last post by:
Hello friends ! , I am very new to java script.If anyone can help me then I will be very very thankful to his/her. I am using php and mysql in my project and I have one textarea and one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.