Hi
I just had a javascript where it helps to redirect to some page after some set of session time
i just had of a code :
protected void PreRender(object sender, EventArgs e)
{
int int_MilliSecondsTimeOut = (this.Session.Timeout * 60000);
string str_Script = @"
<script type='text/javascript'>
intervalset = window.setInterval('Redirect()'," + int_MilliSecondsTimeOut.ToString() + @");
function Redirect()
{
window.location.assign('~/Folder/LogOut.aspx');
// window.location.href='';
}
</script>";
ClientScript.RegisterClientScriptBlock(this.GetType(), "Redirect", str_Script);
}
i used this method in my valid part like :
this.PreRenderComplete += new EventHandler(PreRender);
and add these line of code in my web config file
<system.web>
<sessionState mode="InProc" timeout="1"/>
</system.web>
after this i just run my project login page displayed and i ogged in with the exact values after getting into the home page after 1 minute of time it need to redirect to logout.aspx page but im getting an error saying
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Project1/Files/~/Folder/LogOut.aspx
I am not able to understand why i am get my path as '/Project1/Files/' as default without adding it in my Href path can any one help out why iam getting it and how to resolve it