public ActionResult Index() { var par = (from d in _db.DTypes select new ArticleRepository { dtype = d }).First(); var query = _db.DTypes.Select(c => c.DataType); //var query = from tbl in _db.DTypes // join tb in _db.ParamDtypes on tbl.DataId=tbl.DataId // select new SelectListItem(tbl.DataType).; ViewBag.DTypes = new SelectList(query.AsEnumerable()); return View(); }
@Html.DropDownListFor(model => model.ddlStateId,IEnumerable<SelectListItem>>ViewBag.DTypes,"") @Html.ValidationMessageFor(model => model.ddlStateId)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)