Solved

vb.net web page Loop through comma seperated string

Posted on 2016-08-31
3
20 Views
Last Modified: 2016-09-04
I have a comma separated string I would like to loop through

resetstring

For each item in string
 Response.Write(item)
Next
0
Comment
Question by:lrbrister
3 Comments
 
LVL 12

Accepted Solution

by:
funwithdotnet earned 250 total points
ID: 41778880
Something like ...
Dim myLongString as String = "value1,value2,value3"
DIm myValues() as String = myLongString.Split(CChar(","))
For Each s as String in myValues
 ' s contains the individual comma-separated values.

Next

Open in new window

0
 
LVL 62

Assisted Solution

by:Fernando Soto
Fernando Soto earned 250 total points
ID: 41778889
Hi;

What is your question? By the way your code shown below iterates through the string one character at a time. So item is a single character from the string each time through the loop.

For each item in string
 Response.Write(item)
Next
0
 

Author Closing Comment

by:lrbrister
ID: 41783956
Thanks guys!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now