N
Nathan Sokalski
I want to make an email link using databinding. I am able to get and display
the email address from the database it is stored in using databinding as
follows:
<asp:HyperLink id="lnkEmail1" runat="server" NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.email") %>' Target="_blank"><%#
DataBinder.Eval(Container, "DataItem.email") %></asp:HyperLink>
However, you will notice that because the NavigateUrl attribute is the same
as the displayed text (I did not add the MAILTO the browser interprets it
as a URL. When I try to add the MAILTO: I recieve a runtime error. How do I
fix this so that the NavigateUrl attribute starts with MAILTO: like I want
it to? Thanks.
the email address from the database it is stored in using databinding as
follows:
<asp:HyperLink id="lnkEmail1" runat="server" NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.email") %>' Target="_blank"><%#
DataBinder.Eval(Container, "DataItem.email") %></asp:HyperLink>
However, you will notice that because the NavigateUrl attribute is the same
as the displayed text (I did not add the MAILTO the browser interprets it
as a URL. When I try to add the MAILTO: I recieve a runtime error. How do I
fix this so that the NavigateUrl attribute starts with MAILTO: like I want
it to? Thanks.