Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using querystring in a hyperlink

Posted on 2016-10-22
3
Medium Priority
?
75 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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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 84

Expert Comment

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

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 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