在Global.asax中导入System.Net.Mail [英] Importing System.Net.Mail in Global.asax
本文介绍了在Global.asax中导入System.Net.Mail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将Global.asax文件添加到我的网站。我需要通过它发送电子邮件。一切都很好,但我不知道如何将System.Net.Mail导入文件。
请指教。
谢谢
解决方案
使用System.Net.Mail添加
; $ p您的Global.asax代码文件中的$ p>。
如果没有cs文件,请使用脚本标记添加引用
< script runat = 服务器 >
;
< / script >
如果你想添加global.asax文件可以在这里引用。
http://www.aspdotnet-suresh.com/2011/ 05 / how-to-add-globalasaxcs-file-in-aspnet.html [ ^ ]
答案是
<%@ Import Namespace =System.Net.Mail%>
Hi,
I have added Global.asax file to my website. I need to send email through that. Everything is fine but I do not know how to Import System.Net.Mail to the file.
Please advise.
Thanks
解决方案
Just add
using System.Net.Mail;in your code file of your Global.asax.
In case if dont have a cs file , use a script tag for adding the references
<script runat="server"> using System.Net.Mail; </script>
If you want to add global.asax file can have a reference here .
http://www.aspdotnet-suresh.com/2011/05/how-to-add-globalasaxcs-file-in-aspnet.html[^]
Answer is
<%@ Import Namespace="System.Net.Mail" %>
这篇关于在Global.asax中导入System.Net.Mail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文