如何在C#编程语言中做到这一点 [英] how to make this in c# programming language

查看:90
本文介绍了如何在C#编程语言中做到这一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果两个文本框中的值密码和确认密码不同会给我错误,我该如何在c#中做到这一点. ShowMessage(密码不一样")

请帮助..希望您能理解我!

谢谢你的一切..

最好的祝福!. .

how can I do that in the c# if two textbox in values password and confirm password not same give me error. ShowMessage (''password is not the same'')

please help .. I hope your are understand me!

thanks for everything ..

best regards!. .

推荐答案

有关:
if (string.Compare(myPassword.Text, myConfirmPassword.Text) != 0)
     MessageBox("Passwords do not Match, Please Correct!");


if (txt_pass.text == txt_confirm_pass.text)
{
// Your Logic
}
else
{
MessageBox.Show ("Password not matched.", "My Application", 
MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
}</script>


如果(textbox1.text == textbox2.text)
{
//做点什么;
}
其他
{
Response.write("alert(``您的密码不匹配'')");
}
if (textbox1.text == textbox2.text)
{
// do some thing;
}
else
{
Response.write("alert(''Your Passwords do not match'')");
}


这篇关于如何在C#编程语言中做到这一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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