Solved

Using querystring in a hyperlink

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

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…
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…
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 …

861 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