Posted on: 3/10/2015 12:22:18 PM | Views : 667

Hi all,
Please check the below syntax i am not getting the segments data.
foreach (var RootObject in array) { DataRow dr = DT.NewRow(); dr["destination"] = RootObject.search_id; dr["airline"] = RootObject.signature; dr["destinations"] = RootObject[segments].destinations; // not getting the value
DT.Rows.Add(dr); ViewState["data1"] = DT; }
public class RootObject { public string search_id { get; set; } public string signature { get; set; } public List<segments> segmentsss { get; set; } } public class segments { public string destinations { get; set; } public string destination_country { get; set; } public string origin { get; set; } public string original_destination { get; set; } public string original_origin { get; set; } public string origin_country { get; set; } p ...

Go to the complete details ...