Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.net VB.net open email system

Posted on 2013-10-29
2
Medium Priority
?
397 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:Murray Brown
[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 2000 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:Murray Brown
ID: 39614135
Thanks very much
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

718 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