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

How can I Output items in a Listbox

What codes in c# will help me output items in a list box??
Mar 31 '13 #1
2 1706
r035198x
13,262 8TB
What have you tried?
Apr 1 '13 #2
vijay6
158 100+
Hey afriyie try this,

Expand|Select|Wrap|Line Numbers
  1. string temp = String.Empty;
  2.  
  3. foreach(var t in lb.Items)
  4. {
  5. temp += t + Environment.NewLine;
  6. }
  7.  
  8. MessageBox.Show(temp);
Note: lb is ListBox
Apr 1 '13 #3

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

Similar topics

6
by: M. Clift | last post by:
Hi All, I have tried to come up with a way to do this myself and all I end up with is very long code. What I have is a say item1, item4, item2, item1 etc... What I want to do is append to...
3
by: darren | last post by:
How, using asp.net (vb.net), can I remove multiple selected items from a listbox. Everything I try does not seem to work. Thanks in advance.
3
by: Stimp | last post by:
I have a listbox of values that I populate from a database. I want the user to be able to re-order the list (by first selecting an item and then clicking 'up' or 'down' buttons) and then save...
4
by: Ron | last post by:
I've got a listbox that holds a list of groups. Users can select a group, hit the remove button and the group should be removed from the listbox. The only problem is that no matter which group you...
2
by: bflyrose | last post by:
Hi I need some help I am trying to connect my radio buttons to show prices in the listbox with the name of the movie selected this is what I have so far my problem is I don't know how to get the...
2
by: ProgrammerChicago | last post by:
I'm not sure if this is the result of the postback behavior or my own code, but for some reason my onclick function is not detecting listbox selections (It's meant to delete files uploaded to the...
11
by: gnewsgroup | last post by:
In my web application, I would like to dynamically display the progress of a process, something like: Collecting user input ... Saving user profile ... Generating report in PDF ... Dispatching...
1
by: jasydnor | last post by:
Hi, New to the forums and have a question. I've only been developing for about five months now so I apologize if this seems oversimplistic....I am writing a program on an idea I had on a whim. ...
0
by: alinagoo | last post by:
Hello all. I have a form with 50 ListBoxes. These ListBoxes become appear or disappear on the form(when they appear, a code runs and select all items of the ListBox) and user can select his/her...
6
by: MarkP | last post by:
Is there anyway to save multiple items selected in a list box to a string? Is it then possible to save the string to a record field in a table? Or is there another way to capture multiple items...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.