How to set values for Model properties on .aspx page in ASP.NET MVC 2? -
i have typed view. model passed view , assign model values labels etc.
set model values programmatically on .aspx page, like:
<%= model.somevalue = "foo"; %> and pass model controller action , access values. know can apply values model these:
<%= html.textboxfor(n => n.somevalue) %> but in these case, not option me.
if user not supposed modify values of model inside view use hidden fields or pass unique identifier allow controller action retrieve model repository.
Comments
Post a Comment