Solved

Using querystring in a hyperlink

Posted on 2016-10-22
3
38 Views
Last Modified: 2016-10-22
I have a report which is generated based on a querystring.
Querystring is identified at the beginning of code.
   
     ChartID = Request.querystring("ChartID")

Now I need to use this same querystring to link to another report based on the same ChartID.

      <a href='Results.asp?ChartID= "ChartID"'>Complete report.</a>

Link works fine if I use the following, but not when I try to use the querystring.

     <a href='Results.asp?ChartID=112'>Complete report.</a>
0
Comment
Question by:Malloy1446
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 41855558
Simply double quoting the variable name does not put the value in the link.  Make sure you define ChartID first.

<a href='Results.asp?ChartID=<%=ChartID%>'>Complete report.</a>

Open in new window

0
 

Author Comment

by:Malloy1446
ID: 41855573
Perfect. Many thanks!
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41855604
You're welcome, glad to help.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

9 Experts available now in Live!

Get 1:1 Help Now