加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

使用ASP.NET WebForms的xVal示例?

发布时间:2020-12-15 19:54:44 所属栏目:asp.Net 来源:网络整理
导读:这是一个两部分问题. 是否可以利用ASP.NET WebForms的xVal自动客户端验证? 如果是的话,有没有可用的例子? 我想可以扩展xVal以包含ASP.NET Validator控件.这些控件将是WebForms等效于%= Html.ClientSideValidation()%对于MVC.但是在我深入潜水之前,我想看
这是一个两部分问题.

>是否可以利用ASP.NET WebForms的xVal自动客户端验证?
>如果是的话,有没有可用的例子?

我想可以扩展xVal以包含ASP.NET Validator控件.这些控件将是WebForms等效于<%= Html.ClientSideValidation()%>对于MVC.但是在我深入潜水之前,我想看看是否有其他人尝试过这个. (是的,我确实尝试过Google,但结果不是很有帮助.)

解决方法

从 xVal CodePlex forum:

I think it should be possible to adapt
xVal to work with ASP.NET WebForms.
However to keep the xVal project
focused,I don’t want to try adding
that support and would rather make the
MVC experience as streamlined as
possible.

Feel free to have a go yourself
though!

– Steve Sanderson,xVal cooridinator

因此,当我有一些时间时,我会看到我是否无法修改xVal源以使用WebForms.

更新:我已经创建了xVal.WebForms,这是一个CodePlex项目.有关详细信息,请参阅我的blog post.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读