Am trying to convert aspx page to image i.e save it as a png file. I used iecapt for this. I have many textboxes on aspx page. The problem is the textbox values are not saved in the image file. Am just getting the source file image. Hope i get some suggestions on this. Thank You
protected void btnsend_Click(object sender, EventArgs e) {
string url = "http://localhost:4101/WebForm3.aspx";
if(Request.Params["weburl"] != null)
{
url = Request.Params["weburl"];
}
string savepath = String.Format("C:\\IECapt\\{0}.png" , System.Guid.NewGuid());
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "C:\\IECapt\\IECapt.exe";
process.StartInfo.Arguments = String.Format("\"{0}\" \"{1}\"",url,savepath);
process.StartInfo.UseShellExecute = false;
process.Start();
process.WaitForExit();
process.Dispose();
Response.Clear();
Response.ContentType = "image/png";
Response.WriteFile(savepath);
Response.End();
}