当前位置: 代码迷 >> ASP.NET >> 请教在asp.net页面里面怎么调用outlook发信界面
  详细解决方案

请教在asp.net页面里面怎么调用outlook发信界面

热度:1160   发布时间:2013-02-26 00:00:00.0
请问在asp.net页面里面如何调用outlook发信界面啊
页面上有个button,我点击button然后弹出outlook的发信界面,
string   mailtoStr=   "mailto:a@b.com ";
System.Diagnostics.Process.Start(mailtoStr);
我是这么写的,但是报错。
Exception   Details:   System.ComponentModel.Win32Exception:   An   attempt   was   made   to   reference   a   token   that   does   not   exist

Source   Error:  


Line   56:   string   mailtoStr=   "mailto:a@sb.com ";
Line   57:  
Line   58:   System.Diagnostics.Process.Start(mailtoStr);
大家帮忙看看,怎么才能实现啊。谢谢了。


------解决方案--------------------------------------------------------

------解决方案--------------------------------------------------------
直接写在页面上

<a href= "mailto:a@sb.com "> 发送邮件给我 </a>
------解决方案--------------------------------------------------------
<script>
function mail()
{
alert( 'aaa ');
window.location.href= 'mailto:a@b.com ';
}
</script>
<input type =button value= 'aaaaaa ' onclick=javascript:mail()>
------解决方案--------------------------------------------------------
ding
------解决方案--------------------------------------------------------
<a href= "mailto:a@sb.com "> 发送邮件给我 </a>
------解决方案--------------------------------------------------------
button.Attribute( "onclick ", "test() ");
-------
写前端JS
<script>
function test()
{
document.form1.action= "mailto:a@sb.com ";
document.form1.submit();
}
</script>
------解决方案--------------------------------------------------------
按钮调用脚本
window.location.href= 'mailto:shadow841112@163.com ';
  相关解决方案