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

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -