How can I use Html.DisplayFor inside of an iterator?

前端 未结 6 1483
死守一世寂寞
死守一世寂寞 2020-12-03 06:23

I am loving MVC 2. The whole thing just fits the web so well.

There is one piece of functionality, however, that I am unable to coax out of the Html.

6条回答
  •  被撕碎了的回忆
    2020-12-03 07:03

    Just be careful that a DisplayFor on a POST of a form doesnt actually create a field that can be referenced back in the controller. You would need to use an additional HiddenFor if you need to refer to fields in your submitted POST method.

提交回复
热议问题