Sunday, 15 August 2010

asp.net - How to grab .aspx Page Name from the URL? -


What object can I use to get an existing PageName.aspx (including extension .aspx) from the URL? When I am on a page, I can not find this object and method.

Pino here is the source lil man:

  string sPagePath = System .Web.HttpContext.Current.Request.Url.AbsolutePath; System.IO.FileInfo oFileInfo = New System.IO.FileInfo (sPagePath); String sPageName = oFileInfo.Name;  

No comments:

Post a Comment