Hello:
I’ve tried the Aspose Word Viewer. The example given in the demo project. It’s working fine. It has got a HTML image control which calls DocumentPageHandler.ashx, it calls DocumentPageHandler.cs. This class creates a blank image at the beginning and displays a doc file as an image when Upload button is created.
public void ProcessRequest(HttpContext context)
{
//...........................
}
public bool IsReusable
{
//...........................
}
private Bitmap GetErrorBitmap()
{
//...........................
}
My problem is i’m not using a page rather a user control and wrote the same code. My control inherits a class named
ModuleControl which inherits
public class ModuleControl : UserControl
{
//.........................
protected override void OnPreRender(EventArgs e) //OnInit(EventArgs e)
{
base.OnPreRender(e);
Trace.Write("Begin CustomizeControl()");
CustomizeControl();
Trace.Write("End CustomizeControl()");
}
}
But after this DocumentPageHandler.cs never called. As a result i can’t see the doc file inside the viewer. It loads the file but can’t load the image. I can see the no of pages and it move one page to another.
I’m quite unfamiliar with the page handler technique. So, I can’t understand where should i’ve to call it in this scenario.
I need help.
Thnx-
Razin