Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Help with adding data in listbox using VB.NET

Posted on 2016-09-24
2
Medium Priority
?
48 Views
Last Modified: 2016-09-24
Hi,

How do you add list of data in a listbox by code using VB.NET, for example How do you add the following three rows:

NSN
NSC
FIF

Thanks,

Victor
0
Comment
Question by:vcharles
2 Comments
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 41814192
Hi Victor;

This is how it can be done.
'' Items to be added to the ListBox
Dim items As New List(Of String)() From {"NSN", "NSC", "FIF"}

ListBox1.DataSource = items

Open in new window

0
 

Author Closing Comment

by:vcharles
ID: 41814201
Thank You.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question