Here is a possible solution:string str = "abc,def,hij,klm";foreach (string s in str.Split( new char[] {','} ))Response.Write(s);