I am facing an issue with redirecting to the Login page from every page on my website after session timeout. I attempted to set the window location to the login page using the following code:
var ParentUrl = encodeURIComponent(window.parent.location.href);
document.location.href = "/Login.aspx?ReturnUrl=" + ParentUrl;
However, I found that the use of "~" is not supported in this context. My Login page is located under the root folder of my website.
For example: *http://server/website/*Login.aspx
Is there a way to retrieve this URL using JavaScript?
Thank you,
Inbal.