hidden form element not bound?
Posted
by csetzkorn
on Stack Overflow
See other posts from Stack Overflow
or by csetzkorn
Published on 2010-04-23T11:03:41Z
Indexed on
2010/04/23
13:03 UTC
Read the original article
Hit count: 261
asp.net-mvc
Is it standard/intended behaviour that the value of a hidden form field is not bound to the view model (nor is a query string value)?
Example:
<%= Html.Hidden("test", "13" )%>
if my poco view model contains a property test it should be bound shouldn't it?! i have to set it explicitely in the controller at the moment which kind of defeats the objective doesn't it?
bla( formviewmodel m, string test)
{
m.test = test;
}
any feedback appreciated. thanks!
christian
© Stack Overflow or respective owner