I would like to create a hyperlink with Mailto: Email address should开发者_如何学Python be taken whant entered in a textbox. How do I do this?
Send Email
I want to bind Mail to to a text box value.
Thanks!!
In the aspx page, put:
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="#">HyperLink</asp:HyperLink>
<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True"></asp:TextBox>
In the aspx.vb code-behind, do:
Protected Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
HyperLink1.NavigateUrl = "mailto:" & TextBox1.Text
End Sub
精彩评论