title: How do I get the current page name if it's not displayed in the URL when that page is the default page for a web app?
body: <p>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:</p>
  
  <pre><code>var pathname = window.location.pathname;
  if (pathname.toLowerCase().indexOf("login.aspx") &gt; 0)
      $('#mainmenu').hide();
  else
      $('#mainmenu').show();
  </code></pre>
  
  <p>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?</p>