I am looking a way to separate the values in a datatable. So there will be 1 datatable that will hold all the values that the user enters. Then I would like to separate these values based on some conditions. These 2 groups of values will then be transferred over to 2 different datatables where I would send them to other pages( both are not sending to the same page) through session. Right now, I actually stuck as I am not sure how to spilt it up. I have done some research and found that datatable.select could possibly work. Another way is to use LINQ to Datatable like this:
List<DataTable> result = DTHead.AsEnumerable()
.GroupBy(row => row.Field<int>("MIVID"))
.Select(g => g.CopyToDataTable())
.ToList();
Honestly, I am not too sure which one is good for my application so I decided to bring this to here and ask around. Thanks.