首页上一页 1 下一页尾页 1 条记录 1/1页
邮件
发表在ASP.NET图书答疑
2010-05-29
是否精华
是
否
版块置顶:
是
否
FileInfo fi = new FileInfo(sFilePath);
if (fi.Exists)
{
System.Net.Mail.Attachment myAttachment = new System.Net.Mail.Attachment(sFilePath, System.Net.Mime.MediaTypeNames.Application.Octet);
System.Net.Mime.ContentDisposition disposition = myAttachment.ContentDisposition;
disposition.CreationDate = System.IO.File.GetCreationTime(sFilePath);
disposition.ModificationDate = System.IO.File.GetLastWriteTime(sFilePath);
disposition.ReadDate = System.IO.File.GetLastAccessTime(sFilePath);
myMail.Attachments.Add(myAttachment);
}
全部代码我看不懂 你帮我讲一下 有什么作用是最重要的
if (fi.Exists)
{
System.Net.Mail.Attachment myAttachment = new System.Net.Mail.Attachment(sFilePath, System.Net.Mime.MediaTypeNames.Application.Octet);
System.Net.Mime.ContentDisposition disposition = myAttachment.ContentDisposition;
disposition.CreationDate = System.IO.File.GetCreationTime(sFilePath);
disposition.ModificationDate = System.IO.File.GetLastWriteTime(sFilePath);
disposition.ReadDate = System.IO.File.GetLastAccessTime(sFilePath);
myMail.Attachments.Add(myAttachment);
}
全部代码我看不懂 你帮我讲一下 有什么作用是最重要的