i am having images in the database table. i am getting the file in the front end for the code,
SqlCommand cmd = new SqlCommand("select * from Tbl_VisitorRequestDetails where VisitorId = 1212312313",con);
SqlDataReader dr = cmd.ExecuteReader();
while(dr.Read())
{
Response.BinaryWrite((byte[])dr["PersonImage"]);
}
The above one writes the image in the form.
But i want the file(image) to get attached in to the Email attachments, without saving the image as file and then attaching.
I want the file(image) to be attached directly to the Email-attachments.
Help me in C#.
Thanks.