Capture Screenshots in ASP.NET

By Maximus1983 on Jun 27, 2012

Capture Web Screenshots easily with the GrabzIt ASP.NET API. You will need the free GrabzIt ASP.NET Code Library to get started.

For more information on the API visit.

Register to get your free Application Key and Application Secret.

    * The ASPX code behind

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

    protected override void OnLoad(EventArgs e)
    grabzIt.ScreenShotComplete += grabzIt_ScreenShotComplete;
    grabzIt.TakePicture("", HttpContext.Current.Request.Url.Scheme + "://" +
    HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.ApplicationPath
    + "GrabzIt.ashx");

    //The event method saves the screenshot
    protected void grabzIt_ScreenShotComplete(object sender, ScreenShotEventArgs result)
    Image image = GrabzItClient.GetPicture(result.ID);

    *Add the following lines to your web.config. This allows the screenshot event to work

    <add verb="*" path="GrabzIt.ashx" type="GrabzIt.Handler, GrabzIt" />


Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.