How to add Variable to an HREF in .ASP with VbScript

Posted on 2011-10-11
Last Modified: 2012-06-27
This is what I'm trying to do:

SomeString = "Passed Variable"
Response.write("<a href=""Default.asp?" & someString &">"The Link"</a>")

Open in new window

The page should show a link displayed as "The Link" and direct the user to "Default.asp?Passed Variable"
Question by:Darkejo1
    LVL 33

    Accepted Solution

    Response.write("<a href='Default.asp?var=" & someString &"'>The Link</a>")
    LVL 59

    Expert Comment

    by:Chris Bottomley

    SomeString = "Passed Variable"
    Response.write("<a href=""Default.asp?""" & someString &">The Link</a>")

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (…
    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    This video discusses moving either the default database or any database to a new volume.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now