Make ASP Scripts Portable With Request.ServerVariables(“SCRIPT_NAME”)

A common technique in Active Server Pages (ASP) is to use server-side code to check that the user has filled in a form. In effect, you submit the ASP page to itself and the code decides whether to display the form again or move on. Rather than hard-coding the script name in the form’s Action attribute, you can make your scripts more portable. Internet Information Server (IIS) and ASP supply the name of the script that is being executed as part of the server variables:


Even if you rename your ASP page, the HTML form will still hit its target.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: