Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public ActionResult DisplaySummary([Bind(Prefix = "HomeAddress", Exclude = "Country")] AddressSumary summary)
 {
     return(View(summary));
 }