Asp.Net验证问题。 [英] Asp.Net Validation problem.

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

问题描述

Q1>文本框地址提供验证

条件1: - 如果只是数值,则文本框值不存储数据库应用验证。

条件2: - 如果字符和数值都输入则文本框值存储数据库。



请帮助解决这个问题的人...........

Q1> Textbox address provide validation
condition 1:- if only numeric value then textbox value not store the database apply validation.
condition 2:- if character and numeric both value enter then textbox value store the database.

please help solve this problem guys...........

推荐答案

您可以使用正则表达式验证器来执行此操作,这非常简单。您还应该始终在服务器端验证,无论您的服务器向它投放了什么数据。客户端验证是一种方便,而不是您可以信任的规则。
You can use regular expression validators to do this, it's very easy. You should also ALWAYS validate on the server end, regardless of what data your server has thrown at it. Client side validation is a convenience, not a rule you can trust.


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

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