Solved

vb.net web page Loop through comma seperated string

Posted on 2016-08-31
3
49 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 63

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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 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