tags:

views:

63

answers:

1

Hi,

I have a custom model binder with

public override object BindModel(controllerContext, bindingContext)

that checks session for an object and creates it if it isn't there, then returns the object.

In that same model binder I have:

protected override void BindProperty(controllerContext, bindingContext, propertyDescriptor) , and for some reason  this is NEVER hit on a postback.  

BindModel() is always hit, but breakpoint on first line of BindProperty is never reached. If i comment out the BindModel() override, the BindProperty() WILL be hit. Any idea why?

+1  A: 

are you calling base.BindModel(args) in your overridden BindModel()? If not, the DefaultModelBinder won't try to bind the properties and won't call BindProperty.

dave thieben