List<Attachment> lstAllMailContent = new List<Attachment>();
foreach (Attachment objMailContent in lstAllMailContent)
{
if (objMailContent.ContentDisposition != null)
{
string strname = objMailContent.ContentDisposition.FileName;
}
}
In the above code I want the name of the attachment for which I use the following statement as follows -
string strname = objMailContent.ContentDisposition.FileName;
can i use objMailContent.FileName ??
what is the difference between the two??
but in some cases i get content disposition null which gives me error.
so tell me what can we do in this?? please find a solution as soon as possible thanks