public string GetCurrentPageFileName(){ return new System.IO.FileInfo(Request.PhysicalPath).Name;}
I've also created a base page class in the past to hold these types of methods (below).
/// <summary>/// Base Page class/// </summary>public abstract class BasePage : System.Web.UI.Page{ protected string GetCurrentPageFileName() { return new System.IO.FileInfo(Request.PhysicalPath).Name; }}
Remember Me
original dasBlog theme by Mads Kristensen altered by Donn Felker |
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.