mailto y control literal juntos

Is it possible to do this and how?

email: <a href="" mailto:""email1""">
         <asp:Literal ID="email1" runat="server" >
       </a> <br />

I try this but when I open outlook it doesn't write anything in TO: section.

preguntado el 10 de mayo de 11 a las 13:05

1 Respuestas

If your application is running under .net 3.5;

email:<a href="mailto:<%= Server.HtmlEncode(email1.Text) %>"><asp:Literal Text="" ID="Literal1" runat="server"/></a><br/>

If your application is running under .net 4;

email:<a href="mailto:<%: email1.Text%>"><asp:Literal ID="email1" Text="" runat="server"/></a><br/>

although you can use the first approach on .net 4 as well, it's better to use the second one in order to avoid so called syntactic noise

espero que esto ayude.

contestado el 10 de mayo de 11 a las 17:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.