Transferring a A ID to ASP?

  • Thread starter Michael Kragh Pedersen
  • Start date
M

Michael Kragh Pedersen

I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have earlier
been told how to do that, but I was wondering, how I can check, in ASP
(if at all possible), which of the four links, I have clicked? I was
thinking about something like checking for the ID in the A element, but
I don't know if that's possible?

Michael K. P.
 
M

Martin Honnen

Michael said:
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have earlier
been told how to do that, but I was wondering, how I can check, in ASP
(if at all possible), which of the four links, I have clicked? I was
thinking about something like checking for the ID in the A element, but
I don't know if that's possible?

<a href="whatever.asp?increment=1&amp;id=link1">link 1</a>
<a href="whatever.asp?increment=1&amp;id=link2">link 2</a>
Then in whatever.asp check
Request.QueryString("id")
 
M

Marek Mänd

Michael said:
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have earlier
been told how to do that, but I was wondering, how I can check, in ASP
(if at all possible), which of the four links, I have clicked? I was
thinking about something like checking for the ID in the A element, but
I don't know if that's possible?

This is not a JavaScript question, it is offtopic here.
It has nothing to do with javascript.

Your question is ontopic in newsgroup
microsoft.public.inetserver.asp.general
or something similar.


But short answer is -
you write your hyperlinks in manner
http://www.yourserver.com/index.asp?whatlink=firstlink
http://www.yourserver.com/index.asp?whatlink=secondlink
....
http://www.yourserver.com/index.asp?whatlink=fourthlink

On the server side you extract the "whatlink" value, what is the ID, you
can name it basically whatever you want and make decision based on its
value what to do.

Please go to
microsoft.public.inetserver.asp.general
adn ask there, your possible future ASP questions are not ontopic here,
so it is wise for you to subscribe to that NG.


HTH
 
M

Michael Kragh Pedersen

Marek said:
This is not a JavaScript question, it is offtopic here.
It has nothing to do with javascript.

Your question is ontopic in newsgroup
microsoft.public.inetserver.asp.general
or something similar.


But short answer is -
you write your hyperlinks in manner
http://www.yourserver.com/index.asp?whatlink=firstlink
http://www.yourserver.com/index.asp?whatlink=secondlink
...
http://www.yourserver.com/index.asp?whatlink=fourthlink

On the server side you extract the "whatlink" value, what is the ID, you
can name it basically whatever you want and make decision based on its
value what to do.

Please go to
microsoft.public.inetserver.asp.general
adn ask there, your possible future ASP questions are not ontopic here,
so it is wise for you to subscribe to that NG.


HTH
Sheesh, of course, it is for this newsgroup, I figured, it would have to
be done in JavaScript, why else would I write it here?

Anyway, the problem is, (which I forgot to write unfortunately), that I
don't really want to transfer with the URL, but in some other way, if
possible.

Michael K. P.
 
L

Lee

Michael Kragh Pedersen said:
Sheesh, of course, it is for this newsgroup, I figured, it would have to
be done in JavaScript, why else would I write it here?

Anyway, the problem is, (which I forgot to write unfortunately), that I
don't really want to transfer with the URL, but in some other way, if
possible.

ASP code is executed on the server before the page is sent to the
browser. The only way to pass anything to ASP is by sending another
HTTP request. What you're asking for seems to be two-way real-time
communication between two systems that are never operating at the
same time.


to the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top