摘要:
When errors occur in an ASP.NET application, they either get handled or propagates unhandled to higher scopes. When an unhandled exception propagates, the user may be redirected to an error page using different ASP.NET configuration settings. However, such a redirection may be prevented in the first place by handling the exceptions that get thrown. Error handling in ASP.NET therefore, may be divided into two separate logics:
1.Redirecting the user to an error page when errors go
阅读全文
摘要:
ASP.NET 2.0 中发送电子邮件变得非常简单。发送电子邮件的类库主要在命名空间System.Net.Mail中,在这个命名空间中有两个核心类是:
· MailMessage:描述一个电子邮件消息;它拥有From,To,Subject,Body等属性;
· SmtpClient:把一个指定的MailMessage实例发送到一个指定的SMTP服务器。 阅读全文