i want to open mail box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • truba07
    New Member
    • Jun 2013
    • 1

    i want to open mail box

    I put up this code but it does not work.

    What can I do?

    Code:
    <td style='width:200px;font-size: 12px ;border:solid 1px #ddd2c7; background-color:#fcfaf7; font-family:Verdana;' >
        <a href=" + d["Email"] + "></a>
    </td>


    d["Email"] is email id retrieve from server.
    Last edited by Frinavale; Jun 5 '13, 01:33 PM. Reason: Fixed spelling and grammar and added code tags
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    What you want to do is print the email into the page.
    I am assuming that you are using ASP.NET

    Firstly, if you want to run server script from your page code, you need to wrap it in <% ... %> tags.

    So, if I wanted to write something into the page I would have:
    Code:
    <td style='width:200px;font-size: 12px ;border:solid 1px #ddd2c7; background-color:#fcfaf7; font-family:Verdana;' >
        <a href=" <%response.write(d["Email"])%>"></a>
    </td>
    However, there is a shorthand syntax for printing something into the page: <%= ... %>. The following accomplishes the same thing:
    Code:
    <td style='width:200px;font-size: 12px ;border:solid 1px #ddd2c7; background-color:#fcfaf7; font-family:Verdana;' >
        <a href=" <%=d["Email"]%>"></a>
    </td>
    Now, the above code is pretty "old school".
    If you are using ASP.NET Razor or even MVC, the syntax is a bit different.

    Happy coding

    -Frinny

    Comment

    Working...