웹 캡처 및 변환 도구

ASP.NET을 사용한 스크린 샷 이벤트

ASP.NET API

GrabzIt는 ASP.NET API입니다 또한 이벤트를 지원합니다. 아래는 핸들러를 ScreenShotComplete 스크린 샷이 호출되기 전에 이벤트 그런 다음 스크린 샷이 완성되면 grabzIt_ScreenShotComplete 메서드가 호출됩니다.

private GrabzItClient grabzIt = GrabzItClient.Create("Sign in to view your Application Key", "Sign in to view your Application Secret")%>");

protected void btnSubmit_Click(object sender, EventArgs e)
{ 
    grabzIt.ScreenShotComplete += grabzIt_ScreenShotComplete;
    grabzIt.URLToImage("https://www.tesla.com"); 	

    //The below line specifies the GrabzIt.ashx handler inside the GrabzIt.dll
    grabzIt.Save(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)
{
    GrabzItFile file = grabzIt.GetResult(result.ID);
    file.Save(Server.MapPath("~/results/"+result.Filename));
}

마지막으로 GrabzIt.ashx po가되도록 web.config를 구성하십시오.int에 매니저 에 포함 GrabzIt DLL. 이것이 제대로 이루어지지 않으면 ScreenShotComplete 이벤트가 시작되지 않습니다.

이것을 기억 콜백 응용 프로그램이 localhost에 있으면 작동하지 않습니다.

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