Variable in writing hyperlink url

Discussion in 'ASP General' started by Jas, Sep 18, 2003.

  1. Jas

    Jas Guest

    Hi There

    Can someone tell me how to use varaibles when writing the hyperlinks.

    What we have is the server name and the port number of our application
    defined in the include file.

    instead of hardcoding the name of the server in the application when sending
    emails out like

    <a href="http://myservername:2500">Click here to login</a>

    I would like to use something like this

    <a href=strserver>strMessage</a>

    but don't know how to do it.
    the varaibles strServer and strMessage are defined in the include file

    any help is appreciated
     
    Jas, Sep 18, 2003
    #1
    1. Advertising

  2. Jas

    PB4FUN Guest

    <a href=<%=strserver%>><%=strMessage%></a>

    Or

    <%
    Response.Write "<a href=""" & strserver & """>" & strMessage & "</a>"
    %>

    Where the second option would be slightly (but probably not notable) faster

    Meindert, MCP

    "Jas" <> wrote in message
    news:...
    > Hi There
    >
    > Can someone tell me how to use varaibles when writing the hyperlinks.
    >
    > What we have is the server name and the port number of our application
    > defined in the include file.
    >
    > instead of hardcoding the name of the server in the application when

    sending
    > emails out like
    >
    > <a href="http://myservername:2500">Click here to login</a>
    >
    > I would like to use something like this
    >
    > <a href=strserver>strMessage</a>
    >
    > but don't know how to do it.
    > the varaibles strServer and strMessage are defined in the include file
    >
    > any help is appreciated
    >
    >
    >
     
    PB4FUN, Sep 18, 2003
    #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. Jon paugh
    Replies:
    1
    Views:
    760
  2. davetichenor
    Replies:
    1
    Views:
    846
    Eliyahu Goldin
    Oct 30, 2006
  3. Ken
    Replies:
    1
    Views:
    388
    Alvin Bruney
    Aug 16, 2003
  4. Dave
    Replies:
    0
    Views:
    961
  5. Just D.
    Replies:
    0
    Views:
    446
    Just D.
    Aug 11, 2004
Loading...

Share This Page