www.webdeveloper.com
Results 1 to 4 of 4

Thread: Need a hyperlink that can pass variables to the file it is linked to

  1. #1
    Join Date
    Jan 2006
    Posts
    1

    Need a hyperlink that can pass variables to the file it is linked to

    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!

  2. #2
    Join Date
    Dec 2004
    Location
    Eau Claire, WI
    Posts
    153
    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?

  3. #3
    Ubik's Avatar
    Ubik is offline &lt;%= &quot;New Meja Hor&quot; %&gt;
    Join Date
    Nov 2005
    Location
    Earth
    Posts
    361
    I do it this way:

    strSomeChildDir/call.asp:
    PHP Code:
        dim strPageTitlestrPageDescriptionstrPageRoot
        
        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:
    PHP Code:
        <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.

  4. #4
    Join Date
    Jan 2003
    Location
    USA
    Posts
    688
    <% session ("x") = Request.QueryString("y") %>

    And for a related link about querystrings:

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles