This is for printing screen,
using System.Drawing;
using System.Drawing.Imaging;
Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics graphics = Graphics.FromImage(printscreen as Image);
graphics.CopyFromScreen(0, 0, 0, 0, printscreen.Size);
printscreen.Save(@"filepath", ImageFormat.Jpeg);
I tried putting this in my controller but it does not recognize Screen as anything.
This is for attaching,
System.Net.Mail.Attachment attachment;
attachment = new System.Net.Mail.Attachment("you attachment file");
mMailMessage.Attachments.Add(attachment);
Can I just add the filepath like this?: new System.Net.Mail.Attachment("filepath");