I want to write a c# method to retrieve the current page. eg Default6.aspx I know I can do the following:
string url = HttpContext.Current.Request.Url.Absolu
A simple function like below will help :
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; }