Add hyperlink text to HTML email Asp.net

Discussion in 'Web Development and Programming' started by webkid, Mar 28, 2008.

  1. webkid

    webkid Regular Member

    Joined:
    Mar 26, 2008
    Messages:
    33
    Likes Received:
    0
    Hi all,

    I'm trying to assign a hyperlink text to a string but failed. Hope someone can help me with it! thanks

    string _linkmain = "Go";
     
  2. Adam

    Adam Regular Member

    Joined:
    Mar 17, 2008
    Messages:
    164
    Likes Received:
    0
    Location:
    USA - oursrc.com
    I'm no expert but I believe it's properly formated:

    Code:
    string _linkmain = "<A href=\"http://www.oursrc.com\">Go</A>";
     
  3. Steven

    Steven Regular Member

    Joined:
    Mar 19, 2008
    Messages:
    18
    Likes Received:
    0
    Why aren't you using a ASP.NET Hyperlink component?
    Code:
    Default.aspx: 
    <asp:Hyperlink id="_linkmain" runat="server" />
          or
    <asp:Hyperlink id="_linkalt" runat="server" NavigateUrl="http://www.tennitpros.com">Tennessee IT Professionals</asp:Hyperlink>
    
    Then can dynamicly assign in a corresponding vb(or cs) file..
    Code:
    Default.aspx.vb:
    _linkmain.NavigateUrl = "http://www.tennitpros.com"
    _linkmain.Text = "Tennessee IT Professionals"
    
    This will make your life so much easier if you actually start using ASP.NET.... lol!
     
  4. thedudleys

    thedudleys Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    201
    Likes Received:
    0
    Location:
    Valrico, Fl
    never used ASP.net but from the sound of what you are talking about, it has me very interested since i want to become a programmer who can handle all these types of coding errors...

    thanks for getting my interest more...

    :D
     
  5. nightlinker

    nightlinker Regular Member

    Joined:
    Apr 3, 2008
    Messages:
    248
    Likes Received:
    0
    yes Steven is right.. just use the Asp Component to make it easier for you.. no hassle :D
     

Share This Page