I am facing an issue with my asp.net page where the session timeout warning keeps appearing even if users are inputting data intermittently. Our company policy has a session timeout warning set in the Master page:
var sessionTimeoutWarning = 45;
sessionWarningTimer = setTimeout('SessionWarning()', sessionTimeoutWarning * 60 * 1000);
On the aspx page, I have:
<script type="text/javascript">
window.onload = function () {
$('a').filter(function (index) { return $(this).text() === "Month to Date"; }).click();
};
function ValidateAndShowPopup() {
if (Page_ClientValidate('grpSubmit')) {
SubmitF();
}
}
The button is inside an update panel:
<asp:Button ID="btnSubmitReport" runat="server" Text="Submit" OnClick="btnSubmitReport_Click" ValidationGroup="grpSubmit" OnClientClick="ValidateAndShowPopup()" CssClass="btn" />
The only options seem to be either refreshing the page on button click (which is not preferred), or resetting the javascript timer on the page. Can anyone advise on how to reset the javascript timer variable on button click?