Get a screenshot from an ASP.Net page

左心房为你撑大大i 提交于 2019-12-03 08:18:53
Tuxified

If it needs to be cross-browser and all, you should take a look at Java(applets). It may sound old fashion but I think it's your best option. ActiveX works on windows/IE only ;)

For starters, take a look at this question, which is quite similar: Is there a way to take a screenshot using Java and save it to some sort of image?

ActiveX would work. I suspect you might be able to do something in Silverlight, Flash, or Java applet as well (which would be more cross-browser friendly).

As for copilot, it is running in a stand alone executable that the each user downloads and runs. So it's not confined to typical browser limitations.

It is just the web page you want a snap shot of?

Then you can access the entire pages rendered html from the javascript document object and send it to a web service along with browser type etc. No ActiveX install required :-)

Farhomar

I use WebsitesScreenshot component to capture website screenshot or thumbnail image. This .NET Component is very easy to use. I love this component. http://www.websitesscreenshot.com/

Sample code:

WebsitesScreenshot.WebsitesScreenshot _Obj;
_Obj = new WebsitesScreenshot.WebsitesScreenshot();

WebsitesScreenshot.WebsitesScreenshot.Result _Result;
_Result = _Obj.CaptureWebpage("http://www.msn.com");

if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Captured)
{
    _Obj.ImageWidth = 200;
    _Obj.ImageHeight = 300;
    _Obj.ImageFormat = WebsitesScreenshot.WebsitesScreenshot.ImageFormats.PNG;
    _Obj.SaveImage("c:\\msn.png");
}
_Obj.Dispose();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!