调用定时回发页面的主框架页面的Left菜单页面:
HTML部分
=======


<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><from>
/*

<iframesrc="Message/RefreshMessage.aspx"height="0"runat="server"id="iframeRefresh"></iframe>
</form>
.cs部分
=======


<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->protectedvoidPage_Load(objectsender,EventArgse)
{
if(Session["isRefresh"]!=null&&Session["isRefresh"].ToString()=="1")
{
this.iframeRefresh.Attributes["src"]="ReloadOnTime.aspx";
}
else
{
this.iframeRefresh.Attributes["src"]="OtherReloadOnTime.aspx";
}
}
定时回发页面ReloadOnTime.aspx
HTML部分
=======


<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><%@PageLanguage="C#"AutoEventWireup="true"CodeFile="ReloadOnTime.aspx.cs"Inherits="ReloadOnTime"%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>刷新Session</title>
</head>
<body>
<formid="form1"runat="server">
<asp:TextBoxID="hidtxt_isRefresh"runat="server"></asp:TextBox>
</form>
</body>
</html>
<scripttype="text/javascript"language='javascript'>
window.onload=function()
{
if(document.all.hidtxt_isRefresh.value=="1")
{
window.setInterval("fn_BtnEventOnTime()",600000);
}
}
functionfn_BtnEventOnTime()
{
window.location.reload();
}
</script>
.cs部分
=======


<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->usingSystem;
usingSystem.Data;
usingSystem.Configuration;
usingSystem.Collections;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Web.UI.HtmlControls;
publicpartialclassReloadOnTime:System.Web.UI.Page
{
protectedvoidPage_Load(objectsender,EventArgse)
{
//如果页面不让因用户不操作而过期
if(Session["isRefresh"]!=null)
{
if(Session["isRefresh"].ToString()=="1")
{
this.hidtxt_isRefresh.Text="1";
}
else
{
this.hidtxt_isRefresh.Text="0";
}
}
else
{
this.hidtxt_isRefresh.Text="0";
}
}
}