Solved

Using querystring in a hyperlink

Posted on 2016-10-22
3
45 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with SQL Query 23 52
Using OPENQUERY in a SELECT statement 6 31
subtract 1 in Access 2003 query 7 35
How do I refer to a session variable in a query? 4 12
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

937 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

3 Experts available now in Live!

Get 1:1 Help Now