User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,792 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,691 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 336 | Replies: 1 | Solved
Reply
Join Date: Mar 2008
Posts: 119
Reputation: sonia sardana is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
sonia sardana sonia sardana is offline Offline
Junior Poster

Copy Items from one combobox to another on Button Click

  #1  
May 10th, 2008
In Vb.net,
I do it in the foll. way--

Dim value as string
Button_Click
For each value in combobox1.items
combobox2.items.add(value)
Next

But it is not working in ASP.net.
Plz de reply back.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Veteran Poster

Re: Copy Items from one combobox to another on Button Click

  #2  
May 11th, 2008
I am not entirely sure if this will work as I am not experienced in VB at all (or combo boxes for that matter!):

Try changing this line:

combobox2.items.add(value)

To this:

comboBox1.Items.Add(new Item(value));

This idea came as a result of some searches on google I made. Here is the original post (it might help if my fix doesn't work)
I hope this helps, let us know how it goes.
Last edited by majestic0110 : May 11th, 2008 at 3:23 pm. Reason: Added URL
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 2:34 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC