开发者

Why is there no Html.CheckBoxFor() method in .Net MVC?

开发者 https://www.devze.com 2022-12-13 21:37 出处:网络
The latest MVC release contains some type safe html helper extensi开发者_开发技巧on methods, for example, CheckBoxFor() and LabelFor() does anyone know if there is a particular reason why they haven\'

The latest MVC release contains some type safe html helper extensi开发者_开发技巧on methods, for example, CheckBoxFor() and LabelFor() does anyone know if there is a particular reason why they haven't implemented a CheckBoxFor()?


CheckBoxFor() wasn't finished in time for Beta. It should be available in the next preview release. As for the AddModelErrorFor() overload, there was never any need for it. Errors are supplied by the binders and validators, which use strings rather than expressions. If you can provide a scenario in which using an expression would provide a benefit over simply using strings, we can open a work item for this request.

0

精彩评论

暂无评论...
验证码 换一张
取 消