Problem
1) is when I check for
Expand|Select|Wrap|Line Numbers
- strPDFFile= Server.MapPath("~/HTMLReportSource/PDFSchedules/" & "ABC.pdf")
- If File.Exists(strPDFFile) Then
- strAttachmentPath = "~/HTMLReportSource/PDFSchedules/" & ViewState("VS2005_GENERATED_POLICY_NO") & ".pdf"
- Else
- strAttachmentPath = ""
- end if
2) even If i give the path of the pdf file using
Expand|Select|Wrap|Line Numbers
- attach = New Attachment(System.Web.HttpContext.Current.Server.MapPath(strAttachmentPath))
- smail.Attachments.Add(attach )
I m not sure why this happening as if I send PDFFileNamePath with previously created file, it works fine.
But issue is with the recently created file.
Please help me on this issue as I have already wasted lot of time on this.
thanks in advance.