<%@ page Language = "C#" debug = "true" Explicit="True" %> <%@ Import Namespace = "System.Web.Util" %> <%@ Import Namespace = "System.Web.Mail" %> 發(fā)送郵件 ASP.NET 收件人地址: id="RequiredFieldValidatorInputMailTo" ControlToValidate="inputMailTo" Display="Static" EnableClientScript="False" ErrorMessage="收件人不能為空" runat="server"/> ControlToValidate="inputMailTo" ValidationExpression="^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$" Display="Static" EnableClientScript="false" ErrorMessage="收件人郵件地址錯誤" runat="server"/> 發(fā)件人地址: id="RequiredFieldValidatorInputMailFrom" ControlToValidate="inputMailFrom" Display="Static" EnableClientScript="False" ErrorMessage="發(fā)件人不能為空" runat="server"/> ControlToValidate="inputMailFrom" ValidationExpression="^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$" Display="Static" EnableClientScript="false" ErrorMessage="發(fā)件人郵件地址錯誤" runat="server"/> 郵件主題: id="RequiredFieldValidatorInputMailSubject" ControlToValidate="inputMailSubject" Display="Static" EnableClientScript="False" ErrorMessage="郵件主題不能為空" runat="server"/> 郵件內容: id="RequiredFieldValidatorTextBoxMailBody" ControlToValidate="textBoxMailBody" Display="Static" EnableClientScript="False" ErrorMessage="郵件內容不能為空" runat="server"/> 郵件附件: