逐场验证 [英] field by field validation

查看:74
本文介绍了逐场验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我需要先验证一个字段,然后再跳到asp.net mvc2的下一个字段,而不是在发布或操作时.

Hi I need to validate a field befor skip to the next field asp.net mvc2, not at post or action time.

推荐答案

看看此Asp.NET MVC验证控件. ASP.NET MVC的经典验证控件 [ ^ ]
Take a look at this Asp.NET MVC validation control.Classic Validation Controls for ASP.NET MVC[^]


您应使用javascript验证该字段.使用javascript将允许您先验证客户端上的字段,然后再发布回服务器.

要了解JavaScript字段验证,您可以进行简单的Google搜索. 特定教程似乎非常清晰且易于遵循.[/Edit]
You should validate the field with javascript. Using javascript will allow you to validate the fields on the client side before you post back to the server.

To learn about javascript field validation you can do a simple google search. This particular tutorial seems quite clear and easy to follow.[/Edit]


这篇关于逐场验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆