字符串长度属性
我正在使用 Asp.Net MVC 2,并尝试迭代元数据以将输入控件添加到网格列。默认模型元数据提供程序不会填充大多数属性(例如 DisplayAttribute、StringLength 属性等)。
1-我认为 MVC3 将支持这些属性,对吗?
2-是否有一个自定义提供程序可以在 MVC3 发布之前使用,我记得看到过一个自定义元数据提供程序(以为它在 MVCContrib 中),但在那里找不到它,有人知道在哪里可以找到支持此属性的元数据提供程序吗?
I am using Asp.Net MVC 2, and trying to iterate through the metadata to add input controls to grid columns. Most attributes like DisplayAttribute, StringLength attribute, etc are not populated by the default modelmetadata provider.
1- I think these attributes are going to be supported in MVC3, right?
2- Is there a custom provider that I can use till MVC3 is out, I remember seeing a custom metadata provider (thought it was in MVCContrib) but could not find it there, anyone knows where to find the metadataprovider supporting this attributes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我编写了一个提供程序来处理比标准提供程序更多的属性。想法是这样的:
当然,MVC 的默认模板实际上不会对该信息执行任何操作。您必须 自己定制它们。
I wrote a provider to handle more attributes than the standard provider does. Here's the idea:
Naturally, the default templates with MVC don't actually do anything with that info. You have to customize them yourself.