If you want to get the page filename from the current request url in ASP .NET you can use:

string page = Path.GetFileName(Request.Url.LocalPath).ToLower();


This can be used to switch logica in de master page.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.