• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 72
  • Last Modified:

vb.net web page Loop through comma seperated string

I have a comma separated string I would like to loop through

resetstring

For each item in string
 Response.Write(item)
Next
0
Larry Brister
Asked:
Larry Brister
2 Solutions
 
funwithdotnetCommented:
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
 
Fernando SotoRetiredCommented:
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
 
Larry Bristersr. DeveloperAuthor Commented:
Thanks guys!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now