Click here to Skip to main content
15,881,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<hello>

I wants to open Microsoft outlook on a click of link button.
Posted

Having your web application attempt to open client side programs poses obvious security risks, most browsers won't allow this.

You can probably implement some hacky IE only approach if you like, have a look here

http://stackoverflow.com/questions/776672/opening-outlook-through-javascript[^]

If you simply want to display a new 'email screen', you can use the mailto approach.

If you actually want to automate outlook and perform various actions, I think the Activex approach is the only option - but it's really painful nowadays with all the increased security (good thing!) and should be avoided imo.
 
Share this answer
 
Comments
Uday P.Singh 16-Nov-11 10:30am    
5ed :)
Hope it will helps you
C#
protected void LinkButton1_Click(object sender, EventArgs e)
   {
       string id = "Id@gmail.com";
       Response.Redirect("mailto:"+id);
   }
 
Share this answer
 
Comments
Umashankar Yadav 2-Dec-11 2:46am    
Now how to add bcc and body text in this outlook plz reply..
In your click event handler run
C#
System.Diagnostics.Process.Start("outlook.exe");


[edit] - missed the bit about link button - this approach should only be used on win form.
 
Share this answer
 
v2
Comments
Dylan Morley 16-Nov-11 9:50am    
LinkButton is a web control (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.linkbutton.aspx), therefore this wouldn't be any good - you'd be trying to start a process on the server!
Reiss 16-Nov-11 9:57am    
Thanks missed that bit - always fun guessing what environment the user is working in ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900