Solved

Using querystring in a hyperlink

Posted on 2016-10-22
3
69 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

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 83

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 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