MVC Custom Model Binder Binding Multiple Values
Posted
by BMD86
on Stack Overflow
See other posts from Stack Overflow
or by BMD86
Published on 2010-05-19T12:35:33Z
Indexed on
2010/05/19
12:40 UTC
Read the original article
Hit count: 224
asp.net-mvc
|asp.net-mvc-2
Hello everyone,
I have a scenario in which I have multiple sources to bind to my model. For one, I have a view tied to a strongly-typed model, but this scenario also entails posting data to this view from a 3rd party site.
Essentially, what I believe I am after in the custom model binding is to investigate the form values in the Request object within HTTPContext to see if I have a field such as "postedFirstName". If so, I want to bind that value instead of the textbox "FirstName" in my view.
I've done a good bit of searching but have not find anything that exactly addresses such a scenario. This link was close, I thought, but not quite:
http://stackoverflow.com/questions/970335/asp-net-mvc-mixing-custom-and-default-model-binding
Any input is greatly appreciated!
© Stack Overflow or respective owner