WiredWorx || Web design || SEO || Bournemouth
Web design, website development and search engine optimisation (SEO) in Bournemouth, Dorset, UK.
Home ·
Website and SEO · C# tutorials and tips · Retrieve the current page name
Retrieve the current page name
20.03.2009. 14:15
string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);
string sRet = oInfo.Name;
where sRet will be the name of the current page.