Using variable name in Href

Discussion in 'ASP General' started by J P Singh, Feb 5, 2004.

  1. J P Singh

    J P Singh Guest

    Hi Guys

    How can i use the variable name instead of a hardcoded value when writing a
    hyperlink.

    strBody = strBody & "<a href="default.htnk">Login</a>"


    I would like to use a variable name instead of directly writing default.html
    like below

    strPageName = "default.html"

    strBody = strBody & "<a href="<%=strPageName%>">Login</a>"


    Anyone know how this can be done

    thanks

    Jas
     
    J P Singh, Feb 5, 2004
    #1
    1. Advertising

  2. J P Singh

    Alex Goodey Guest

    strBody = strBody & "<a href="""&strPageName&""">Login</a>"

    "J P Singh" <noemail@asIhatespam> wrote in message
    news:OmKhPE%...
    > Hi Guys
    >
    > How can i use the variable name instead of a hardcoded value when writing

    a
    > hyperlink.
    >
    > strBody = strBody & "<a href="default.htnk">Login</a>"
    >
    >
    > I would like to use a variable name instead of directly writing

    default.html
    > like below
    >
    > strPageName = "default.html"
    >
    > strBody = strBody & "<a href="<%=strPageName%>">Login</a>"
    >
    >
    > Anyone know how this can be done
    >
    > thanks
    >
    > Jas
    >
    >
     
    Alex Goodey, Feb 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    202,061
    Adrienne Boswell
    Jun 20, 2006
  2. Bobby Chamness
    Replies:
    2
    Views:
    2,416
    Joe Smith
    Apr 22, 2007
  3. Soren Vejrum
    Replies:
    4
    Views:
    674
    Lasse Reichstein Nielsen
    Jul 5, 2003
  4. saiho.yuen
    Replies:
    3
    Views:
    458
    kaeli
    Sep 14, 2004
  5. kelvlam
    Replies:
    6
    Views:
    356
    kelvlam
    Jul 18, 2006
Loading...

Share This Page