Beispiel #1
0
        public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            AddressSumary model = (AddressSumary)bindingContext.Model ?? new AddressSumary();

            model.City    = GetValue(bindingContext, "City");
            model.Country = GetValue(bindingContext, "Country");
            return(model);
        }
 public ActionResult DisplaySummary([Bind(Prefix = "HomeAddress", Exclude = "Country")] AddressSumary summary)
 {
     return(View(summary));
 }