⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 send.aspx

📁 applet在線上繪圖,允許在瀏覽器上繪圖,最後儲存成各式的圖檔
💻 ASPX
字号:
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace="System.Web.Mail" %>
<html>
<head>
<title>Send image</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body bgcolor="#C0C0CA">
<%

NameValueCollection fields = Request.Form;

if (fields.Count > 0) {

  MailMessage myMail = new MailMessage();
  string filePath = Server.MapPath("./");
  myMail.Attachments.Add(new MailAttachment(filePath + "\\" + fields.Get("filename")));

  myMail.From    = fields.Get("from");
  myMail.To      = fields.Get("to");
  myMail.Subject = fields.Get("subject");
  myMail.Body    = fields.Get("message");

  SmtpMail.SmtpServer = "localhost";
  SmtpMail.Send(myMail);
  
  Response.Write ("<p>Image and message are sent successfully</p>");
  Response.Write ("<p><a href='edit.htm'>Go back to editing</a></p>");
}

%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -