BackEnd Programming C#(cSharp) 

How to Capture Screenshot of a website Using ASP.Net

To Take a Screenshot of a website first you have to Create a Account in  Grabz.It and they will Provide you API keys to integrate it in your application.

Then to use the API you will first need to create an instance of the GrabzItClient class, passing your application key and application secret from your GrabzIt account to the constructor.

//Create the GrabzItClient class
//Replace "APPLICATION KEY", "APPLICATION SECRET" with the values from your account!
private GrabzItClient grabzIt = GrabzItClient.Create("APPLICATION KEY", "APPLICATION SECRET");

Then use one of the SetImageOptions, SetPDFOptions, SetAnimationOptions or SetTableOptions methods to request that the GrabzIt service take a screenshot of the URLpassed to it.

// To take a image screenshot
// Or to take a PDF screenshot
// Or to convert online videos into animated GIF's
// Or to capture table(s)

Then use one of the following save methods. Notice that we also include the URL to the handler, which will process the callback from the service and save the resulting screenshot. As this method requires a callback handler it is usually only possible to use this approach in a web application.


Alternatively the synchronous Save To method, this will force your application to wait while the screenshot is created so it should only be used were the Save method cannot be used, such as in a desktop application. Once the screenshot is created it is saved to the file path provided.

string filepath = "images/test.jpg";

Download Here

Arjun is is a web developer/designer, who is fond of the web. He lives in Manipal, Karnataka, India.

Also Read:  How to create server side session using javascript

Related posts