Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .asp page that generates an html link

    hello there

    i want to create a simple .asp page that generates an html link on the page.

    example:

    mylink.asp?n=1

    for n = 1-27

    where n is the value that is parsed when clicking the original link.

    if this makes any sense to you and you can help then thank you very much

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Code:
    <% for n = 1 to 27
      response.write("<a href=""mylink.asp?n=" & n & """>My Link #" & n & "</a><br />" & vbCrLf)
    next %>
    Quickie explanation:

    FOR n = 1 to 27 ... NEXT This will loop through all numbers from 1 to 27, incrementing by 1.

    RESPONSE.WRITE Send text from the ASP interpretor to the web browser's screen.

    You will notice inside the link the usage of " & n & "... This means - place my n value from the FOR...NEXT loop here.

    HTH!
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #3
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks very much!


  •  

    Posting Permissions

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