i have a model class like,
public class Report {
public string No { get; set; }
public string FirstName { get; set; }
NameValueCollection Data { get; set; }
public Report() {
Data = new NameValueCollection();
}....
}
And from my model i retrive all data list this particular model
public ActionResult Search(string q) {
var search = new Models.Search(q);
return View(search.GetReportItems());
}
var search contain all the items including "Data"
and my View is
@model List<...Models.Report>
@foreach (var item in Model)
{
<tr>
<td>@item.No</td>
<td>@item.FirstName </td>
// here i want show the items in "Data "
</tr>
}
how can i show the items in that particular NameValueCollection . please help me