Sunil Sudhansu

Sunil Sudhansu

  • 1.4k
  • 307
  • 32.2k

var query = from p in db.country_master select new{Cid = p.

May 29 2017 11:00 PM
Dear Sir ,
var query = from p in db.country_master select new{Cid = p.ID,cname = p.Country,ccode=p.Country_code,active = p.Active== true ? "D-Activate" :"Activate"};
\
@foreach (var item in Model)
{
<tr>
<td>@(Model.IndexOf(item) + 1)</td>
<td>@item</td>
<td>@item.Country_code</td>
<td><a href="#" class="btn btn-success btn-xs">@item.Active</a></td>
</tr>
}
 
we use alias then how to call cshtml page for bind table. 

Answers (1)