Is it possible to do this and how?
email: <a href="" mailto:""email1""">
<asp:Literal ID="email1" runat="server" 开发者_开发百科>
</asp:Literal>
</a> <br />
I try this but when I open outlook it doesn't write anything in TO: section.
If your application is running under .net 3.5;
email:<a href="mailto:<%= Server.HtmlEncode(email1.Text) %>"><asp:Literal Text="info@example.com" 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="info@example.com" runat="server"/></a><br/>
NOTE:
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
hope this helps.
精彩评论