Find Current Page Name In Code - Asp.Net VB

by Colin Graham 19. October 2010 14:21

For those who need a function to find the current website page name using ASP.Net then this is a possible solution.

 

Private Function sub_FindPageName() As String

Dim strScriptName As String

Dim intPos As Integer

strScriptName = Request.ServerVariables("script_name")

intPos = strScriptName.LastIndexOf("/")

Return Right(strScriptName, Len(strScriptName) - intPos - 1)

End Function

Tags: , ,

ASP.Net | Visual Basic VB

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading






 

Posts By Date

Log in