与数据库连接时在c#.net中的验证 [英] Validations in c#.net when connected with database

查看:91
本文介绍了与数据库连接时在c#.net中的验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有诸如用户名",密码",符合"和"Emailid"之类的字段
和一个提交按钮.
当用户正确输入所有字段时,输入的数据应该在数据库中.如果用户忘记输入用户名,那么我们应该验证文本框是否要求输入用户名.所有其余字段都类似.

密码和规范也应该匹配,然后只有输入的数据才能输入数据库.

用户应输入带有@和的mailid.符号是强制性的.如果用户未以"nani@gmail.com"的形式输入,则那么输入的数据不应在数据库中更新.

Hi,

I have the fields such as Username, Password, Conform and Emailid
and a submit button.
When the user enters all the fields correctly, then the entered data should be in the database. If user forgets to enter username, then we should validate the textbox saying that username is required. Similarly for all the remaining fields.

The password and conform should also match then only the data entered should enter into the database.

The user should enter mailid with @ and . symbols compulsorily. If user doesn''t enter in the form as "nani@gmail.com" then the entered data should not be updated in the database.

推荐答案

一个非常非常常见的要求.你做了什么研究?到目前为止,您尝试了什么?
A very, very common requirement. What research have you done? What have you tried so far?


快速入门:
http://www .google.com/search?complete = 1& hl = zh-CN& q = Validations + in + c%23.net& aq = f& oq = [
For a quick start:
http://www.google.com/search?complete=1&hl=en&q=Validations+in+c%23.net&aq=f&oq=[^]


这篇关于与数据库连接时在c#.net中的验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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