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
Edit:
I inspected the form values like this:
string[] t = Request.Form.AllKeys;
for( int c = 0; c < Request.Form.AllKeys.Count(); c++ )
{
string[] x = Request.Form.GetValues(c);
}
and it definatley contains the value of test.