比较验证器 [英] Compare Validator

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

问题描述

朋友,

我正在使用c#.net开发Windows应用程序.这样,我可以在该窗口中创建一个登录窗口,我想比较用户名和密码,然后重定向到其他某种形式.....

我如何在Windows应用程序中使用方法(请记住我没有使用asp.net)

如果有任何想法,请紧急发送.

hi friends,

i am developing a windows application using c#.net. In that i can Create a login window in that window i want to compare the username and password and then redirect to some other form.....

how can i approach in windows application (remember that i am not using asp.net)

if any one can have an idea please be send urgently

推荐答案

我看到您还没有尝试过任何东西.
创建文本框以获取用户详细信息,创建按钮以提交它并对照数据库进行检查.如果成功,请导航至其他表格.

如果您做不到这些,则需要在编写代码之前先阅读一些基础知识.
但是一本不错的C#书或在CodeProject或许多其他站点上阅读过文章.
:thumbsup:
I see you haven''t tried anything.
Create textboxes to get user details, create button to submit it and check against database. If successful, navigate to a different form.

If you can''t do these, you need to read some basics before you code.
But a good C# book or read articles on CodeProject or so many other sites.
:thumbsup:


if(txtUserName.Text.Trim().Length.Equals(0)
&& txtPassword.Text.Trim().Length.Equals(0))

如果您要检查是否在用户naem和密码文本框中输入了值,请尝试此操作....

如果要检查格式,则可以输入正则表达式
if(txtUserName.Text.Trim().Length.Equals(0)
&& txtPassword.Text.Trim().Length.Equals(0))

try this one if u want to check if a value is enterd in the user naem and password text boxes....

if want to check the format then u can go for a regular expression


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

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