Archive

Archive for December, 2016

Get Current Page Name

December 6, 2016 Leave a comment

Hi all,

Try this example to Get Current Page Name

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

Hope this helps

Good Luck.

Advertisements
Categories: ASP.Net