foreach (GridViewRow gvrow in grdfiledetails.Rows) { Label lbl = (Label)gvrow.FindControl("lblfilename"); string SupportAttachmentFilePath = "D:\\Program Files\\Duck Creek Technologies\\Express\\Temp\\SupportAttachments"; SupportAttachmentFilePath += "\\" + lbl.Text; string BasePathValue = lbl.Text; firstAttachment = new Attachment(SupportAttachmentFilePath); firstAttachment = new Attachment(SupportAttachmentFilePath, MediaTypeNames.Application.Octet); mail.Attachments.Add(firstAttachment); //attach1 = BasePathValue; //firstAttachment.Dispose(); } try { SmtpServer.Send(mail);}<pre lang="c#">
firstAttachment
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)