c# - Pass Model to controller using Html.HiddenFor -
at form submission, using @html.hiddenfor(a => a.modelparameter)
hold of values makes way controller. question is, models have many parameters (25+) there improve way pass of parameters using @html.hiddenfor
?
for example,
foreach(var parameter in model) { @html.hiddenfor(modelitem => modelitem.parameter) }
or along these lines avoid having individual @html.hiddenfor
every single parameter.
you set attribute on properties supposed hidden.
is there way utilize @html.hiddenfor finish model?
c# .net model-view-controller
No comments:
Post a Comment