下载一个WebThumb控件 然后// C# - Convert HTML to Image // Set the image filename. string t_strSaveFolder = Server.MapPath("./"); string t_strLargeImage = t_strSaveFolder + "\\" + "main-thumb.large.png"; string t_strSmallImage = t_strSaveFolder + "\\" + "main-thumb.small.png";// Create instance ThumbMakerClass t_xThumbMaker = new ACAWebThumbLib.ThumbMakerClass();// Start convert web page http://www.acasystems.com to image t_xThumbMaker.SetURL("http://www.acasystems.com"); t_xThumbMaker.StartSnap();// Save the image with full size in C# t_xThumbMaker.SaveImage(t_strLargeImage);// Save the image with 320x240 in C# t_xThumbMaker.SetThumbSize(320, 240, 0); t_xThumbMaker.SaveImage(t_strSmallImage);
然后// C# - Convert HTML to Image
// Set the image filename.
string t_strSaveFolder = Server.MapPath("./");
string t_strLargeImage = t_strSaveFolder + "\\" + "main-thumb.large.png";
string t_strSmallImage = t_strSaveFolder + "\\" + "main-thumb.small.png";// Create instance
ThumbMakerClass t_xThumbMaker = new ACAWebThumbLib.ThumbMakerClass();// Start convert web page http://www.acasystems.com to image
t_xThumbMaker.SetURL("http://www.acasystems.com");
t_xThumbMaker.StartSnap();// Save the image with full size in C#
t_xThumbMaker.SaveImage(t_strLargeImage);// Save the image with 320x240 in C#
t_xThumbMaker.SetThumbSize(320, 240, 0);
t_xThumbMaker.SaveImage(t_strSmallImage);
http://www.codeproject.com/KB/graphics/IECapture.aspx