drupal stats

Get current page name in ASP.NET

July 1st, 2011 Web Forms 3 Comments


string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;

System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);

string sRet = oInfo.Name;

Response.Write(sRet);

 

Demo Get current page name

Get current page name in ASP.NET thumb Get current page name in ASP.NET

Tags: asp net get page name, asp net get current page name, how to get current Page name in asp net, get page name in asp net, asp net get current page, get current page name in asp net, get page name asp net, how to get page name in asp net, asp net current page, Get current page name asp net

Related posts:

  1. Get current URL in ASP.NET
  2. Export GridView to Excel in ASP.NET
  3. Export DataTable to CSV/Excel
  4. Clear TextBox on Focus in ASP.NET
  5. Export GridView to CSV

3 Comments

  1. Varun says:

    Nice piece of code, really helpful – thank you.

  2. danar says:

    This is very good thank you

  3. gaga says:

    Thanks!! :D