在登陆的时候,如过密码期限过期,我就用js弹出一个提示窗口。如果我重新登陆,在IE不关的情况下,就不会弹出那个窗口。必须重新打开IE,重新登陆。这是为什么呢?

解决方案 »

  1.   

    密码期限过期是根据当前web服务器的系统时间,和密码在数据库中的时间做一下比较(每一个密码都对应一个日期在数据库中)
      

  2.   

    还是不明白楼主什么意思如果只是禁止客户端缓存可以使用HTML标记,如下面: 
    <HEAD> 
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
    <META HTTP-EQUIV="Expires" CONTENT="0"> 
    </HEAD>
      

  3.   

    我要在Page_Load执行下面的代码,一个弹出提示窗口:
    if ( LoginHandle.IsShowPasswordHint ) {
    this._ShowPopupWindow("PasswordHint.aspx",false,"",300,200,200,200,false,false,false,false,false,false,false,false);可在Page_Load有这样的判断代码:
    if ( sys.IsOnlineConflict(user) )
    {// 登陆冲突,该用户已经在其他机器上登陆
    LogonLogData ds = sys.GetCurrentLogonInfo(this._LoginUser.AgID);

    string msg = String.Format(this._GetResourceString("log_message_invalid_conflict_logoned"),ConvertHelper.GetString(ds.Tables[LogonLogData.TABLE_IA_LOGON_LOG].Rows[0][LogonLogData.LOGON_IP_FIELD].ToString()));
    this.RegisterStartupScript("__loginConfirm","<script>loginConfirm('" + msg +  "');</script>");
    }
    else
    {
    this.Login(user);
    }
    }其中this.Login(user)的代码如下:
    private void Login( UserInfo user )
    {
    FormsAuthentication.SetAuthCookie(this._loginID, false);
    new LoginSystem().LoginLog(this._LoginUser,LogonType.On);
    new OnLineSystem().UpdateSalesOnLogin(this._LoginUser); IMainFrame mainFrame = new MainFrame();
    mainFrame.OutputMainFrame(this.Response,this._ApplicationTitle);

    //FormsAuthentication.RedirectFromLoginPage(this._loginID,false);
    }通过调试发现,一但执行this.Login(user)这段代码,放在这个判断后面的弹出提示的那段代码就不能执行? 为什么?
      

  4.   

    this._ShowPopupWindow 是一个利用StringBuilder,Response出来的一段JavaScript窗体
      

  5.   

    是否转向其他页面了?
    那样的话输出到本页的脚本当然无效了在浏览器中看一下,页面的HTML源码中脚本是否有问题(右键,查看源文件)
      

  6.   

    其中mainFrame.OutputMainFrame(this.Response,this._ApplicationTitle);
    的代码: 
    public void OutputMainFrame( HttpResponse response, string Title )
    {
    if ( response == null )
    {
    log4net.LogManager.GetLogger(this.GetType()).Error("OutputMainFrame:HttpResponse is null !");
    return ;
    } // TODO:  Add MainFrame.OutputMainFrame implementation
    string type = ConfigHelper.GetUserConfigation(ConfigHelper.CONFIG_COMMON,
                                              ConfigHelper.KEY_MAIN_FRAME_MODE).ToUpper();
    switch ( type )
    {
    case "S"://Static
    response.Redirect("MainFrames.htm");
    break;
    case "D"://Dynamic
    response.Buffer = true;
    response.Write(ChinaTM.BLL.SysInfo.MainSystem.GetMainFrameScript(Title));
    response.Flush();
    break;
    default:
    response.Redirect("MainFrames.htm");
    break;
    }
    }
    转向其它页面了,那如果我还要实现这个功能不是没办法了?
      

  7.   

    改为客户端转向
    在输出的Javascript语句后面加分号,加window.location='欲转向的页面';
      

  8.   

    我现在要在
    response.Redirect("MainFrames.htm");调用前或者调用后
    弹出另一个小页面("AAA.aspx"),这条语句该如何写?
      

  9.   

    <script language="JavaScript">window.open(aaa.aspx');
    window.location='mainframes.htm';</script>
      

  10.   

    在URL后面加个参数表明每次访问的地址不一样的,如加个时间