In the Linq after retrieving from the dataset how can i get the column data without using the for each statement?
var query = from alias in ds.Tables[0].AsEnumerable()
where alias.Field<string>("lanename") == ddlLaneController.SelectedItem.Text
select new
{
locname = alias["LocationName"],
locid = alias["locationid"]
};
txtStartLocation.Text = query.Select(a => a[“LocationName”]).ToString();
Can i know how can i achieve this?
Thanks,
Vara Prasad
If there is a single resulting row use
Single: