If you need to find the aspx page name (including the folder it's in, if applicable) use the AppRelativeCurrentExecutionFilePath property of the Http Request:
string filename=HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath;
This will return results like: ~/MyFolder/My.aspx or ~/MyRootLevel.aspx
I found this at: http://www.west-wind.com/weblog/posts/132081.aspx
Thursday, January 27, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment