ASP.NET - from DataRow how to split the bunch of data and render using Viewmodel

Asked By Harsha kammar on 09-May-22 02:12 AM
 foreach (DataRow dr in ds.Tables[0].Rows)
                Viewmodel.responsemodel.Add(new responsemodel
                    Summary = (string)dr["SUMMARY"]


This has data like name,mobile number etc for each user, I should be able to split inside that pick a string to render it
Robbe Morris replied to Harsha kammar on 05-Jun-22 01:30 PM
var list = Summary.split(",".ToCharArray());

I think this is what you are after if you intend to parse the contents of Summary based on some sort of delimiter.