Click to See Complete Forum and Search --> : Need a hyperlink that can pass variables to the file it is linked to


oz_egirl
01-19-2006, 03:33 AM
I have this code for a page...

<%session ("x") = "mySymbol"%>
<!--#include file="show_single.asp"-->

This is all the code that is on the page, and I have called it call.asp.
Is it possible to change the code to...

<%session ("x") = "y"%>
<!--#include file="show_single.asp"-->

where a hyperlink from another page will pass 'y' as being the value 'mySymbol'?
I have quite a few pages and I don't wanna make up a directory with 2000 files in it.

Cheers&Beers
oz!

candelbc
01-19-2006, 08:59 AM
Maybe I am not understanding correctly, but if you are using the Session Variables, couldn't you just read the Session Variable on your other page?

Ubik
01-19-2006, 12:48 PM
I do it this way:

strSomeChildDir/call.asp:

dim strPageTitle, strPageDescription, strPageRoot

strPageTitle = "Bob's Mom's Homepage"
strPageDescription = "Unfortunately, she is not like Mrs. Robinson at all."
strPageRoot = "../"

%><!--#include file="../show_single.asp" --><%


Then, in [root]/show_single.asp:

<title><%=strPageTitle%></title>
...
<meta name="description" content="<%=strPageDescription%>" />
<style type="text/css" media="screen">@import url(<%=strPageRoot%>css_main.css);</style>


It's not exactly what you are looking for, but I think it might help with your request.

Bullschmidt
01-23-2006, 08:19 PM
<% session ("x") = Request.QueryString("y") %>

And for a related link about querystrings:

Classic ASP Design Tips - QueryString
http://www.bullschmidt.com/devtip-querystring.asp