会话超时后,页面未完全清除

时间:2014-03-10 19:45:54

标签: c# asp.net

我们遇到一个问题,当会话超时发生时 - 它会注销用户,然后显示登录屏幕。问题是我们有一个页面标题,其中包含供用户点击的标签。但我们也会自动呈现最常见的标签网格。页眉保持不变。因此,超时后,该页面标题就在那里,并显示新页面标题,因此有2个页面标题。 出路是x out和relogin。但是有一些方法可以在超时时清除整个页面,这是我的标题页

<

%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Interchange.aspx.cs" Inherits="FDB.Views.Interchange" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script lang="jv" type="text/javascript">

        function SetHiddenValue(fieldName, val) {
            if (hfCommon.Contains(fieldName))
                hfCommon.Set(fieldName, val);
            else
                hfCommon.Add(fieldName, val);
        }

        function GetHiddenValue(fieldName) {
            if (hfCommon.Contains(fieldName))
                return hfCommon.Get(fieldName);
            else
                return null;
        }

        function ImageClick(s, e) {
            var val = GetHiddenValue('ShowHideFilter');
            if (val == null)
                SetHiddenValue('ShowHideFilter', true);
            else {
                SetHiddenValue('ShowHideFilter', !val);
            }
            val = GetHiddenValue('ShowHideFilter')
            gvPBMCharges.PerformCallback('ShowHideFilter,' + val.toString());
        }

        function TreeCheckedChanged(s, e) {
            gvPBMCharges.PerformCallback(e.node.name + '');
        }

        function ColExpClickFacility() {
            //debugger;
            var divM = document.getElementById('ASPxRoundPanel1_div3');
            if (divM != undefined && divM != null) {
                if (divM.style.display == 'block') {
                    divM.style.display = 'none';
                    hlColExpFacility.SetText('Expand Facility');
                }
                else {
                    divM.style.display = 'block';
                    hlColExpFacility.SetText('Collapse Facility');
                }
            }
        }

        function ColExpClick() {
            var divM = document.getElementById('div1');
            var divTop = document.getElementById('divTop');
            if (divM != undefined && divM != null) {
                if (divM.style.display == 'block') {
                    divM.style.display = 'none';
                    //s.SetImageUrl('../Content/Images/expand.png');
                    hlColExp.SetText('Expand Instructions');
                    divTop.style.height = '45px';
                }
                else {
                    divM.style.display = 'block';
                    //s.SetImageUrl('../Content/Images/collapse.png');
                    hlColExp.SetText('Collapse Instructions');
                    divTop.style.height = '165px';
                }
            }
        }

        function CheckedChangedSelectAll(s, e) {
            if (s.GetChecked()) {
                cblFacility.SelectAll();
            }
            else {
                cblFacility.UnselectAll();
            }
            gvPBMCharges.PerformCallback('');
        }

        function SelectedIndexChangedFacility(s, e) {
            gvPBMCharges.PerformCallback('');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div runat="server" id="divTop">
                <div runat="server" id="divTitle" style="float: left; width: 50%;">
                </div>
                <div runat="server" id="divFilter" style="float: right; text-align: right; width: 49.84%; height: 34px; padding-top: 10px;">
                    <table border="0" style="width: 100%;">
                        <tr>
                            <td style="padding-left: 3px; padding-top: 3px; text-align: right;">
                                <div runat="server" id="div2" style="width: 100%; padding-bottom: 5px;">
                                    <dx:ASPxHyperLink runat="server" ID="hlColExp" Font-Underline="true" ClientInstanceName="hlColExp" Text="Expand Instructions" NavigateUrl="javascript:ColExpClick();">
                                    </dx:ASPxHyperLink>
                                </div>
                            </td>
                            <td style="padding-left: 3px; text-align: right; width: 90px;">Select Patient:
                            </td>
                            <td style="padding-left: 3px; text-align: right; width: 215px;">
                                <dx:ASPxComboBox runat="server" ID="cboPatient" ValueField="Id" TextField="Name" NullText="Select patient from drop down" Width="200">
                                    <ClientSideEvents SelectedIndexChanged="function(s,e){ gvPBMCharges.PerformCallback(''); }" />
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                    </table>
                </div>

0 个答案:

没有答案