Search code examples
vbscriptasp-classic

How to get query parameter from URL in VBScript?


I have a requirement from my client to get the query parameter of an URL with VBScript, the URL is like below:

www.xxx.com/index.asp?sn=2

Need to get the value of "sn".

What should the code be like?

No idea how to use VBScript to get the parameter.


Solution

  • I got the code:

    dim sn
    sn = Request.QueryString("sn")
    

    It works.