text: how do i have an asp page return it's own name? let's say i have a page called "mypage.asp".  i want to insert the filename of the page into a string variable.  right now, i'm just hardcoding on every page [strname="mypage.asp"].  is there a way to have the page grab it off its own filename? using vb script you can grab the file path, which returns the full file path of the current page (e.g. /somedirectory/somefile.asp). once you have this, you'll need to split the value using the forward slashes. this will create a one dimensional array. just grab the last item in the array and you have your file name. below is a vb script example:   function getfilename() dim lspath, arpath  lspath = request.servervariables("script_name")  arpath = split(lspath, "/")  getfilename =arpath(ubound(arpath,1)) end function 