Showing posts with label current page. Show all posts
Showing posts with label current page. Show all posts

Tuesday, February 9, 2010

Get current page name in ASP.Net

public string GetCurrentPageName() 
{
string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);
string sRet = oInfo.Name;
return sRet;
}