Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: ocean10000
I'm trying to compare a name of a page from a Database, to that of the current page.
But I don't know how to retrieve the name of the current page.
IF DBPageName.aspx = CurrentPageName.aspx THEN
but CurrentPage.aspx needs to be retrieved from the Q-string somehow.
Dim strPath As String = Request.ServerVariables("PATH_INFO")
strPath = strPath.Substring(strPath.LastIndexOf("/") + 1)
It calls the "PATH_INFO" server variable and separates only the page name out based on the last instance of "/".
Hope this helps,