Is it possible to take a screenshot of a web page with ASP.net with C# Code

Posted by vimalkumar G on Stack Overflow See other posts from Stack Overflow or by vimalkumar G
Published on 2009-06-12T04:21:10Z Indexed on 2010/04/04 1:43 UTC
Read the original article Hit count: 409

Filed under:
|

Is it possible to take a screenshot of a web page with ASP.net with C# Code and then submit that back to the server? In this code access only local host only, but same source code not access to the IIS, CopyFromScreen error ware occurred. What is the reason is it possible?

Sample Source Code:

Bitmap Bitmap;
Graphics Graps;
Bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height - 110, PixelFormat.Format32bppArgb);
Graps = Graphics.FromImage(Bitmap);
Graps.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, 110, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
Bitmap.Save(Server.MapPath("~") + "/YourShot.gif");

© Stack Overflow or respective owner

Related posts about screen-capture

Related posts about c#