Request ServerVariables Common Task

ASP.Net Get name of current page

Get the name of the current webpage.
When requesting "www.SomeWebSite.com/customer/details.aspx" you want "details.aspx"
string nameOfWebPage = System.IO.Path.GetFileName(Request.ServerVariables["PATH_TRANSLATED"]);
Dim nameOfWebPage As String = System.IO.Path.GetFileName(Request.ServerVariables("PATH_TRANSLATED"))
Related ServerVariables PATH_TRANSLATED
     << Back