日期:2014-05-18  浏览次数:20430 次

不知道的错误 从登录页面进行登录后 不能正确返回
我这是一个登录的页面.当在首页进行登录时,如果密码错误,就会转到另外一个登录页面.   在该登录页面输入用户名和密码后,即使都正确,在点了登录后,仍不能正确返回.下面是登录按钮对应的代码:
protected   void   Button_Click(object   sender,   EventArgs   e)
        {
             
                        if   ((!String.IsNullOrEmpty(TextBox_Login_Name.Text))   &&   (!String.IsNullOrEmpty(TextBox_Login_Password.Text)))
                        {
                                if   (UserLogin(TextBox_Login_Name.Text.Trim(),TextBox_Login_Password.Text.Trim()))
                                {
                                    ACard.CUser.UserLogin(Session[ "username "].ToString(),   DropDownList_Cookie.Text.Trim(),   null,   true);
                                        Response.Redirect( "Left.aspx ");
                                }
                                else
                                {
                                        Label_Notice.Text   =   ( " <span   style= 'color:   #ff0000;   font-size:   10pt '> 用户名或密码不正确 </span>   ");
                                }
                        }
                        else
                        {
                                Label_Notice.Text   =   ( " <span   style= 'color:   #ff0000;   font-size:   10pt '> 请输入用户名和密码 </span>   ");
                        }
               
        }
这部分代码,我是参照首页的登录按钮对应的代码重新写了一遍,为什么首页的可以登录成功,这里就不行?

------解决方案--------------------
如果实在找不出错误,为什么不直接去掉这一页面呢?