Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 MVC 2 中使用新的客户端验证功能,但我有一个特定的视图,上面只有几个文本框,我不想为它创建一个强类型模型。有人可以描述如何利用 MVC 2 w/oa 强类型模型中的验证优势吗?
我不认为它可以完成,因为客户端验证使用 System.ComponentModel.DataAnnotations 命名空间中的数据注释。据我所知,您必须将其绑定到一个对象。我建议看一个 jquery 解决方案。