Hw do I get the current page name if it's not displayed in the URL

Fabiolas

New Member
I have an ASP.NET web site. There's an ASP.NET menu on the Masterpage. I want to to hide the menu if the current page is the login page. My login page is Login.aspx. Here's the code how I make the menu invisible/visible:\[code\]var pathname = window.location.pathname;if (pathname.toLowerCase().indexOf("login.aspx") > 0) $('#mainmenu').hide();else $('#mainmenu').show();\[/code\]But when I deploy it on the IIS, the url does not include the page name when the web site is opened for the first time, thus the menu becomes visible.How do I determine the current page in this case?
 
Back
Top