how can I get Current page name/url in .net 3.5 aspx page.
as well as help in if statement in aspx page.
thanks in advance!!!
Get Current Page Name in aspx
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
nitin yadav100 reputationPosted Sep 30, 2011, 3:51 AM EDT
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; }Mittal Sejpal75 reputationPosted Sep 30, 2011, 7:38 PM EDT