Results 1 to 10 of 10

Thread: Passing the name of the hyperlink or something???

  1. #1

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Thumbs up Passing the name of the hyperlink or something???

    Hello guys!!!

    I have this problem in ASP. Well the logic is this:

    I have 2 pages. One in HTML and one in .ASPX.

    The HTML page has a hyperlink that say's Hello World.

    I want to pass the Hello World value to the next page in ASP.

    Please help me!!!

    Here's the code:

    The HTML page:

    <td width="56%" CLASS="style13"><a href="WebForm2.aspx" name="Ian">Hello World</a></td>

    The .ASPX page:

    Dim a As String

    a = Request.Form("Hello")


  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Passing the name of the hyperlink or something???

    I think there are 3 ways to pass info. Check out the excellent tutorial on ASP from here:
    http://www.w3schools.com/default.asp

  3. #3

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: Passing the name of the hyperlink or something???

    Quote Originally Posted by dglienna
    I think there are 3 ways to pass info. Check out the excellent tutorial on ASP from here:
    http://www.w3schools.com/default.asp
    Hey thanks for the link. It helped a little.

    But I still have one more question.

    Is it possible pass the name of the HTML hyperlink to the querystring? If yes

    then how?

  4. #4

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: Passing the name of the hyperlink or something???

    Please help me!!!!


  5. #5
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    Re: Passing the name of the hyperlink or something???

    well, isn't this possible?
    href="WebForm2.aspx?name=Ian"
    ?
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  6. #6

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: Passing the name of the hyperlink or something???

    Quote Originally Posted by wengang
    well, isn't this possible?
    href="WebForm2.aspx?name=Ian"
    ?
    Well it did pass the string "Ian" but not the Hello World which is the intended

    value.


  7. #7
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    Re: Passing the name of the hyperlink or something???

    OK.
    so use the innerText property of the A Tag:
    <a href="#" onClick="location.href='WebForm2.aspx?textvalue='+ this.innerText;">Hello World</a>

    and on your target page, you can request("textvalue")
    I'm not sure, but you may have to replace ("%20", " " ) to get your spaces back, maybe not.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  8. #8
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Passing the name of the hyperlink or something???

    Hi,

    To make things easy, why dont you just use the server variable

    request.Servervariables("HTTP_REFERRER")

    thisll pass the page name to to wherever you want it..

    ta

    kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  9. #9
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    Re: Passing the name of the hyperlink or something???

    Hey Kaihirst. Did you post this on the wrong thread? The one about the URL as parameter would be more suitable.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  10. #10
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Passing the name of the hyperlink or something???

    Hi,

    yeah wrong thread!!!

    ta

    Kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


Posting Permissions

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



Click Here to Expand Forum to Full Width