开发者

Hyperlink with navigationURL

开发者 https://www.devze.com 2023-02-20 03:29 出处:网络
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?

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号