Asp.net 缓存问题? 急急急! 在登陆的时候,如过密码期限过期,我就用js弹出一个提示窗口。如果我重新登陆,在IE不关的情况下,就不会弹出那个窗口。必须重新打开IE,重新登陆。这是为什么呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 密码期限过期是根据当前web服务器的系统时间,和密码在数据库中的时间做一下比较(每一个密码都对应一个日期在数据库中) 还是不明白楼主什么意思如果只是禁止客户端缓存可以使用HTML标记,如下面: <HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="0"> </HEAD> 我要在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)这段代码,放在这个判断后面的弹出提示的那段代码就不能执行? 为什么? this._ShowPopupWindow 是一个利用StringBuilder,Response出来的一段JavaScript窗体 是否转向其他页面了?那样的话输出到本页的脚本当然无效了在浏览器中看一下,页面的HTML源码中脚本是否有问题(右键,查看源文件) 其中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; } }转向其它页面了,那如果我还要实现这个功能不是没办法了? 改为客户端转向在输出的Javascript语句后面加分号,加window.location='欲转向的页面'; 我现在要在response.Redirect("MainFrames.htm");调用前或者调用后弹出另一个小页面("AAA.aspx"),这条语句该如何写? <script language="JavaScript">window.open(aaa.aspx');window.location='mainframes.htm';</script> 在URL后面加个参数表明每次访问的地址不一样的,如加个时间 微博的个性域名是HttpHandler实现的吗? 现在网站上的图片都显示不出来了,我该怎么做呢 ListView控件怎么获取选取项的索引值 关于C# 采集的问题 散分!!!!!!!!!!!!!!!!!!!! 高手来啊,详细问题请看.高分!!!!!! webpart 问题! No size set for variable length data type 不明白了 兄弟们,帮俺写个项目总结! ~~~~~~~~???怪事????~~~~~~~~~ DataGrid分组统计 请教电子杂志的原理
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD>
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)这段代码,放在这个判断后面的弹出提示的那段代码就不能执行? 为什么?
那样的话输出到本页的脚本当然无效了在浏览器中看一下,页面的HTML源码中脚本是否有问题(右键,查看源文件)
的代码:
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;
}
}
转向其它页面了,那如果我还要实现这个功能不是没办法了?
在输出的Javascript语句后面加分号,加window.location='欲转向的页面';
response.Redirect("MainFrames.htm");调用前或者调用后
弹出另一个小页面("AAA.aspx"),这条语句该如何写?
window.location='mainframes.htm';</script>