Answer:
- bindingContext.ModelType = typeof [ReservationLocation](
- dynamic data = binding Context.ValueProvider.GetValue("loc")
- bingContext.ModelStat.Add("city,state",mew ModelState {Value=data})
- dynamic data = controllerContext.RouteData.Values(raw +"[city,state]"]
public class ReservationModelBinder: IModelBinder
{
{
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
}
}
{
- var raw = bindingContext.ValueProvider.GetValue("loc")
- dynamic data= raw.RawValue.ToString().Split(',');
return new ReservationLocation
{
{
City = data[0];
State = data[1];
}