Tech Junkie Blog - Real World Tutorials, Happy Coding!: ASP.NET Get The Current Page File Name

Sunday, June 19, 2016

ASP.NET Get The Current Page File Name

In this blog we will get the current page file name that the user is currently on.

string[] currentUrl = HttpContext.Current.Request.Url.AbsolutePath.Split('/');
string pageFileName = currentUrl[currentUrl.Length-1];

2 comments:

  1. Thanks for sharing informative content…Find best digital marketing company to know more and Contact us on given no.…

    ReplyDelete
  2. Thanks for sharing this.,
    Leanpitch provides online training in A-CSPO during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days A-CSPO Certification Workshop in different cities.

    a-cspo certification
    a-cspo training

    ReplyDelete

Search This Blog