Hi,
I would like to know what does this mean?
I have this script loaded in page_load from my master page
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "onLoad", "DisplaySessionTimeout()", True)
and a javascript data in my mastepage.aspx
var sessionTimeout = "<%= Session.Timeout %>";
function DisplaySessionTimeout() {
//assigning minutes left to session timeout to Label
document.getElementById("<%= lblSessionTime.ClientID %>").innerText = sessionTimeout;
sessionTimeout = sessionTimeout - 1;
//if session is not less than 0
if (sessionTimeout >= 0)
//call the function again after 1 minute delay
window.setTimeout("DisplaySessionTimeout()", 10000);
else
{
//show message box
alert("Your current Session is over.");
window.location.href("Login.aspx");
}
}
In first page, this works properly.. but in when I redirect to another page, it doesn't work. Please help. Thank you in advance.