开发者

In asp.net how to disable popup message when redirecting to another page

how to disable popup message when redirecting to another page?

i am having login page and home page and registration page.

i gave one alert message when user name and password in correct it's display

i entered wrong username and password it display message after i am postback registration page

complete my registration after redirect my开发者_如何学JAVA login page that time it also displayed same alert

why this ? how to resolve ? please help to me

Page.RegisterStartupScript("aa", 
    "<script>alert('Please Enter Correct UserName and Password');</script>");

i am using this.


It's a logical bug. You need to check whether the Username/password fields are empty or not and if empty then you have to execute you javascript code

if( string.isNullOrEmpty(username) 
     && string.isNullOrEmpty(password) )
  Page.RegisterStartupScript("aa", "alert('Please Enter Correct UserName and Password');");


put the Page.RegisterStartupScript in if condition in page load of login

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜