Need Page Name without needing asp.net authentication
Posted on 2010-11-08
Hello, I need the page name of the current asp.net page but the problem that I am having is I am getting security issues with the following code:
Public Function GetCurrentPageName() As String
Dim sPath As String = System.Web.HttpContext.Current.Request.Url.AbsolutePath
Dim fInfo As System.IO.FileInfo = New System.IO.FileInfo(sPath)
How can I get the current page name without the security issues on an asp.net page when it is up on the server? Please let me know. Thanks!