var t = db.Names.Where(r => r.ID == id).Select(i=> new { i.ID, i.FirstName }); ViewBag.name= t;
@Html.Editor("name", new { htmlAttributes = new { @class = "form-control" } })
@ViewBag.name
"name"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)