如何在链接按钮上打开Outlook单击 [英] How To open Outlook on linkbutton click

查看:306
本文介绍了如何在链接按钮上打开Outlook单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< hello>

我想通过单击链接按钮来打开Microsoft Outlook.

<hello>

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

推荐答案

让您的Web应用程序尝试打开客户端程序会带来明显的安全风险,大多数浏览器都会赢得胜利.不允许这样做.

如果愿意,您可能可以实施一些仅适用于IE的方法,请在此处查看

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

如果只想显示一个新的电子邮件屏幕",则可以使用mailto方法.

如果您实际上想自动执行Outlook并执行各种操作,我认为Activex方法是唯一的选择-但是如今,随着所有增强的安全性(好东西!),它确实很痛苦,应该避免imo.
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.


希望对您有帮助
Hope it will helps you
protected void LinkButton1_Click(object sender, EventArgs e)
   {
       string id = "Id@gmail.com";
       Response.Redirect("mailto:"+id);
   }


在您的click事件处理程序中运行
In your click event handler run
System.Diagnostics.Process.Start("outlook.exe");



[edit]-错过了有关链接"按钮的内容-这种方法只应在获胜表格中使用.



[edit] - missed the bit about link button - this approach should only be used on win form.


这篇关于如何在链接按钮上打开Outlook单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆