Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tracking the anchor link with asp

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
Hi everyone,

I am trying o figure out how I can track which anchor link is clicked from a dynamic index created when a user chooses a client id. I need to pass this along to create a sql script for another database query based on which linked is clicked.

Any ideas, anyone????

thanks
bastien
 
Hi,

I have many ideas, but I don't know exactly what you want. Let me see if I understood. You have a list of anchors, each one with a (virtual) given ID.
When you create this page you know which IDs you want to pass through, so when you create the anchor put that information on the anchor. How? Using QueryStrings.
Code:
<a href=TARGET_URL?id=<% =id %>>ID Text</a>
On the TARGET_URL you only have to get the ID and use it:
Code:
id = Request.QueryString(&quot;id&quot;)
There are other ways, you can use a form or/and JavaScript to do that but QueryStrings is the easiest way.

Regards,
Luís Silva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top