Tuesday, November 11, 2008

Bind Hyperlink.NavigateUrl to mailto: action without using code-behind

This is a very simple and elegant (but annoying to figure out) way to bind HyperLink.NavigateUrl to an email address with a mailto: action without using code-behind

 
 
<asp:HyperLink NavigateUrl=’&lt;%# Bind(”EmailAddress”, “mailto:{0}”) %&gt;‘ Text=’&lt;%# Bind(”Email”) %&gt;‘ runat=”serverID=”EmailHyperLink></asp:HyperLink>
 

 

Enjoy

1 comment:

raynnowui21 said...

Would you be fascinated by exchanging links? bovada casino