Click here to Skip to main content
15,900,724 members

Comments by spanner21 (Top 62 by date)

spanner21 7-Apr-14 10:57am View    
not getting...Could you please elaborate
spanner21 7-Apr-14 8:44am View    
1)I made sure there will be no duplicate attachements
2)firstAttachment is declared inside the foreach loop
3)made the attachment only once.

now the code is as shown:

foreach (GridViewRow gvrow in grdfiledetails.Rows)
{
Attachment firstAttachment;
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);
}

but i saw in google that dispose will work...so i tried to write it in after
SmtpServer.Send(mail);
but not able to acess the object of Attachements which is firstAttachment here..

please help..

i am stuck here...The process cannot access the file error is hammering me
spanner21 7-Apr-14 8:12am View    
i am adding all the files to a grid and then sending the mail by picking the files from grid
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);
}

its my code
spanner21 13-Jan-14 1:45am View    
Hi tadit,

this is my code for closing the pop up:

<asp:Button ID="btnClose" OnClientClick="self.closepopup(); return false" OnClick="btnClose_Click" Text="Close" runat="server"/>


and on clikc i am clearing my textbox.

please help how to close the pop up
spanner21 10-Jan-14 8:43am View    
hi tadit firt of all thanks but i am getting some problem in closing pop up also ,when i clcik on the link button on th epop up suppose say close button if i click it my pop up nneds to be close ...but its not closing giving javascript error so pls suggest