Please how can i use the .Split properly. Right now it is not givin me the result i want. i am using LiteralTitle.Text.Split(',') to split records inserted in one column separated by comma. but the problem i am having is that the unsplitted records shows first before the slipted records. How can i hide the unsplitted records so it dosnt show at all. for example, this is what is showing
1Arsenal, 2Chelsea, 3Bolton
1Arsenal
2Chelsea
3Bolton
How can i make sure that only this shows
1Arsenal
2Chelsea
3Bolton
Below is my code section:
StringBuilder sb = new StringBuilder();
foreach (var s in aways)
{
sb.AppendLine(s.Title.ToString());
}
LiteralTitle.Text = sb.ToString();
foreach (string s in LiteralTitle.Text.Split(','))
{
LiteralTitle.Text += s + "<br />";
}
Thanks.