显示JS警报或无效登录的消息框 [英] Display JS alert or Message Box for Invalid login
本文介绍了显示JS警报或无效登录的消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Asp.net中获得Java脚本警报或消息框.对我来说,要求是如果呼叫者输入了无效的用户名或密码,我需要在消息框中显示警告消息".请帮助我.感谢Advance.
How to get Java script alert or Message box in Asp.net. For me the requirement is ''If the caller enters invalid user name or password, I need to show the warning message in Message box'' . Please assist me on this.Thanks in Advance.
推荐答案
尝试在函数中使用布尔值.
如果登录成功,则返回true
如果没有返回false并提醒您的消息.
您可以在登录button_click事件后从C#代码中调用此javascript函数
Try Using Boolean values in your function.
if the login is successful return true
if not return false and alert your message.
You can call this javascript function from C# code behind on login button_click event
Window.alert(错误消息");
Window.alert("Error Message");
这篇关于显示JS警报或无效登录的消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文