Solved

Splitting a Piped String Help

Posted on 2006-07-19
2
206 Views
Last Modified: 2010-04-16
Hello all.  I have a dropdown that my 0 index has a piped account number like 112121|321333|343242.  I need to somehow loop through and grab each number and then use it in a call.  Can anyone give me help with this.  Its in a SelectedValue
0
Comment
Question by:sbornstein2
2 Comments
 
LVL 18

Accepted Solution

by:
Ravi Singh earned 500 total points
ID: 17140827
Hi, use the split method and specify a delimiter, it'll return a string array with each number on a seperate index:

string accountNumbers = this.comboBox1.SelectedValue.ToString(); //get the value
string[] accountNumberArray = accountNumbers.Split('|'); //split it

foreach (string actNum in accountNumberArray) //loop through array
{
     //use actNum here
}
0
 

Author Comment

by:sbornstein2
ID: 17141311
thank you so much
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Page navigation in windows phone 8.1 application not working. 5 24
Help with C#, MVC, razor. 6 34
Exit the loop 4 42
C# bracket error 3 30
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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