My controller's action accepts two parameters, each having a custom ModelBinder
:
public ActionResult MyAction(
[ModelBinder(typeof(FooBinder))] Foo foo,
[ModelBinder(typeof(BarBinder))] Bar bar)
Is there a way to access the foo
instance in the BarBinder
?
我不得不求助于其中一个合作使用感知模式FooBinder
分享其foo
例如BarBinder
通过controllerContext.Controller.TempData
字典。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.