Given an action like:
public ActionResult DoStuff([CustomAttribute("foo")]string value) {
}
Is there a way to allow an instance value CustomAttributein ModelBinder? I looked at MVC sources and most likely I am just doing it wrong, but when I tried to reproduce their code that retrieves BindAttribute for a complex model, calling GetAttributes () does not return the attribute I'm looking for.
DefaultModelBinder
GetTypeDescriptor(controllerContext, bindingContext).GetAttributes();
source
share