Print Page | Close Window

Request asp name.

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7981
Printed Date: 01 April 2026 at 1:14am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Request asp name.
Posted By: Badaboem
Subject: Request asp name.
Date Posted: 10 December 2003 at 6:21am

I have currently added some ''next'' and ''previous'' buttons to a latest downloads module on my page, but it always returns to index.asp.

Is there a way to check the current page and have that entered as a string?




Replies:
Posted By: Badaboem
Date Posted: 10 December 2003 at 6:56am

Never mind..found it.

<SCRIPT Language=VBScript RUNAT=SERVER>
Function getFileName()
  Dim lsPath, arPath

  ' Obtain the virtual file path
  lsPath = Request.ServerVariables("SCRIPT_NAME")

  ' Split the path along the /s. This creates an
  ' one-dimensional array
  arPath = Split(lsPath, "/")

  ' The last item in the array contains the file name
  GetFileName =arPath(UBound(arPath,1))
End Function
</SCRIPT>




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net