MVC Html Helpers

DropDownListFor View helper sample code @Html.DropDownListFor(model => model.OperatorValue, (List<SelectListItem>)ViewData[“OperatorValue_SelectList”], new { @class = “form-control” }) Controller sample code, this can […]

Read more

MVC Data Annotations

Date formatting [DisplayFormat(DataFormatString = “{0:dd/MM/yyyy}”, ApplyFormatInEditMode = true)] Number formatting [DisplayFormat(DataFormatString = “{0:N}”, ApplyFormatInEditMode = true)]

Read more

MVC Controllers

Web Result ActionResult Web Return return RedirectToAction(“ActionName”, “ControllerName”, new { id = vwModel.SomeId }); return View(“ViewName”, vwModel); return PartialView(“_PartialViewName”, vwModel); […]

Read more

Unity

“The Unity Container (Unity) is a lightweight, extensible dependency injection container. It facilitates building loosely coupled applications” References https://www.codeproject.com/Articles/988257/Dependency-Injection-using-Unity-container https://msdn.microsoft.com/en-us/library/dn223671(v=pandp.30).aspx […]

Read more
1 2 3 6