Solved

ASP.net VB.net open email system

Posted on 2013-10-29
2
390 Views
Last Modified: 2013-10-31
Hi

I have a button on my ASP.net web page. When a user clicks o it
I want it to open the users email  in a new email  with
a certain email address as would
happen when you click on an email address in e.g. Word
How would I achieve this?
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39609125
you should be able to do something like:

<INPUT TYPE="button" VALUE="Email" onClick="location.href='mailto:someAddress@email.com" />

if you're looking to do it through the OnClick event, you'll need to use some JS:

<form id="Form1" method="post" runat="server">
<P>Type 5 in the box and click the button</P>
<P>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox></P>
<P>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button></P>
<P>
<asp:HyperLink id="HyperLink1" runat="server" Visible="False"
NavigateUrl="mailto:me@myplace.com">Comment</asp:HyperLink></P>
</form>
Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
If TextBox1.Text = "5" Then
Dim sb As New System.Text.StringBuilder
sb.Append("<script TYPE='text/javascript'>")
sb.Append("window.location='mailto:me@myplace.com' ;")
sb.Append("</script>")
Response.Write(sb.ToString)
End If
End Sub

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 39614135
Thanks very much
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
e commerce steps shown instead of self testing 2 59
Adding Rows to Grid 4 34
Manage big list of parameter list 8 27
dropdownlist in asp.net vb. 3 25
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question