passing variables between asp pages

Results 1 to 9 of 9

Thread: passing variables between asp pages

  1. #1
    wilbur Guest

    Default passing variables between asp pages

    I am attempting to pass a variable from one asp page to another. First of all, here is my statement.<BR><BR>http://mydomain/asp/gigs.asp?band_name=big+breakfast&clubpass=country< BR><BR>Where band_name=big+breakfast is used to fill a query criteria and clubpass=country is intended to pass the variable clubpass to the page gigs.asp. <BR><BR>The gigs.asp page pulls up the query information correctly, but I haven&#039t been able to retrieve the value of clubpass(which is set to country) for use on the gigs.asp page.<BR><BR>What do I do? I tried to use the request statement, but I don&#039t think I have the correct syntax. Thanks for any help!

  2. #2
    Join Date
    Dec 1969
    Posts
    572

    Default RE: passing variables between asp pages

    Try this:<BR>.../gigs.asp?band_name=big+breakfast&amp;clubpass=coun try<BR><BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    572

    Default RE: passing variables between asp pages

    Sorry, it didn&#039t go through first time(I don&#039t know why).<BR><BR>.../gigs.asp?band_name=big+breakfast&amp;clubpass=coun try<BR>

  4. #4
    Join Date
    Dec 1969
    Posts
    572

    Default RE: passing variables between asp pages

    For some reason it doesn&#039t like what I&#039m typing in. I&#039ll try to spell it out:<BR>.../gigs.asp?band_name=big+breakfast& then (no space) amp then (no space); then (no space) clubpass=country. <BR>Hope it&#039ll go through this time.<BR><BR>


  5. #5
    wilbur Guest

    Default Alex RE: passing variables between asp pages

    Alex, is this what you meant?<BR><BR>asp/gigs.asp?band_name=big+breakfast&@;clubpass=countr y<BR><BR>Also, how do I retriev the value of clubpass in the page gigs.asp?<BR><BR>Thanks

  6. #6
    Join Date
    Dec 1969
    Posts
    572

    Default RE: Alex RE: passing variables between asp pages

    Yes, but instead of @ type &#039amp&#039.<BR><BR>To retrive values use:<BR><BR>a = Request("band_name")<BR>b = Request("clubpass")

  7. #7
    Jim Cruff Guest

    Default RE: passing variables between asp pages

    Try this:<BR><BR>Response.Write "&#060;A HREF=gigs.asp?band_name=" & Server.URLEncode("big breakfast") & "&clubpass=" & Server.URLEncode("country") & "&#062;"<BR>Response.Write"Test Link&#060;/A&#062;"<BR><BR>Always use Server.URLEncode() when passing values.<BR><BR>Hope the formatting comes out properly in the post

  8. #8
    Wilbur Guest

    Default RE: Alex RE: passing variables between asp pages

    Thanks Alex, that did the trick!! Do you know where I can find out information on all the symbols being used, such as %, amp, ? etc. Are these symbols part of SQL or standard asp syntax? Thanks again Alex for all of your help!

  9. #9
    Join Date
    Dec 1969
    Posts
    572

    Default RE: Alex RE: passing variables between asp pages

    They are neither SQL nor ASP symbols. They’re HTML symbols. I don’t remember where I saw the article, but there should be a lot of info about them on MS site or no any other ASP/HTML support/help site. It shouldn’t be a problem to find one of them. Good luck.

Posting Permissions

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