You can iterate through a DataTable and create new one with comma separated values, something
like this:
Example :
string result = string.Empty;
DataTable dt=new DataTable; dt = obj.GetIDs();
ListmyIds = new List (); foreach(DataRow dr in dt.Rows) { myIds.Add( Convert.ToString(dr["ID"])); } string result = string.Join(",", myIds);
No comments:
Post a Comment