Hyperlink Parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I pass a value to a .asp page from a hyperlink to filter the results
on the traget page? I know how to do this from two pages that contain
database results how do I do this if the first page is a static page with
just hyperlinks to .asp results?

Is this possible?

Tia

Jonathan
 
<a href="pagename.asp?parametername=value>Pass Value of your parametername to pagename.asp</a>

On the receiving page (pagename.asp)
yourparametername = Replace(Request.QueryString("parametername"), "'", "''")

--




| How do I pass a value to a .asp page from a hyperlink to filter the results
| on the traget page? I know how to do this from two pages that contain
| database results how do I do this if the first page is a static page with
| just hyperlinks to .asp results?
|
| Is this possible?
|
| Tia
|
| Jonathan
 
Wouldn't that be:

yourparametername = Request.QueryString("parametername")

?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
Yes, but to help avoid SQL Injection issues, you would want to use the method shown in Stefan
example.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
You've lost me now.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
I am confused now - sorry I am a new to all this - idots version would be
appreciated

Cheers

J
 
Just use the example that Stefan provided. However, Kevin's will also work.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

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

Back
Top