Hi
I am doing MVC and have look-up values in drop down lists. When calling UpdateModel only values before the look-ups get updated and nothing afyer. I get no errors though.
I can edit and create and use the following code in my cintroller:
ViewData["SiteMaintenanceId"] = from m in this._siteRepository.FindAllSiteMaintenances().ToList()
select new SelectListItem
{
Text = m.Maintenance,
Value = m.SiteMaintenanceId.ToString(),
Selected = (m.SiteMaintenanceId == site.SiteMaintenanceId)
};
return View(new SiteFormViewModel(site,
this._siteRepository.FindAllSiteOperators()));
I have the following in my view:
<%= Html.DropDownList("SiteOperatorId")%>
This seems to bind ok and allows me to get the selected value on edit of my drop down and create works.
This is my very first time doing MVC so any help greatly appreciated.