Coding A Page Dependence in ASP ClassicIf you need some ASP code to execute only on a given page, the way to do this is with a statement like: <% where you should substitute "yourpagename.asp" with the actual name of your .asp page. The InStr function returns the position of a given string (in this case "yourpagename.asp") within another (in this case Request.ServerVariables("SCRIPT_NAME")). InStr will return 0 when each string is exactly the same. An example usage of this is to highlight the page name when you are on that page, by substituting a particular image only on that page.
|
|
All Content ©2020 WebRef.eu |