Hi
I am having a list of string in List<string> sContent;
scontent contains 7 string.
I need to add <br /> in between the string that is in list.
I tried string.join("<br />", sContent);
But it not working.
Please advice me.
.Net 2.0 - .Net 3.5
List<string> arr = new List<string>(); string s = ""; arr.Add("1"); arr.Add("2"); arr.Add("3"); arr.Add("4"); for (int i = 0; i < arr.Count; i++) { s += arr[i] + "<br />"; }
.Net 4.0
string ss = string.Join("<br />", arr);
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.