![]() |
How to retrieve current page name
Hi, folks:
I am looking for a way to get the name of the current page in code. Just the page name, eg. login.aspx. I have used Request.CurrentExecutionFilePath and the Split method of the String class, like this: Dim thisPath As String = Request.CurrentExecutionFilePath Dim thisPage As String() = thisPath.Split("/"c) Dim pageName = thisPage(thisPage.Length - 1) There must be a simpler way! TIA, Val |
Re: How to retrieve current page name
Dim pageName As String =
Request.CurrentExecutionFilePath().Replace(Request .ApplicationPath + "/", "") "Valerian John" <vjohn@shentel.net> wrote in message news:OSvQGD1ZDHA.2308@TK2MSFTNGP12.phx.gbl... > Hi, folks: > > I am looking for a way to get the name of the current page in code. Just > the page name, eg. login.aspx. > I have used Request.CurrentExecutionFilePath and the Split method of the > String class, like this: > Dim thisPath As String = Request.CurrentExecutionFilePath > > Dim thisPage As String() = thisPath.Split("/"c) > > Dim pageName = thisPage(thisPage.Length - 1) > > There must be a simpler way! > > TIA, > > Val > > > > |
| All times are GMT. The time now is 11:42 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.