Using GDPicture 14, DocuVieware ASP.NET web forms 4.5.
I have a buton to Close the open document. I can close the doc from the js function easily. But, I want to release & manage memory, so I am interested in doing it thru code behind. The problem with code behind is, I got to click the button twice, then only it works. Here's the code :
Javascript :
Code: Select all
function closeDocument() {
//DocuViewareAPI.PostCustomServerAction("docuView", true, "CloseDoc"); // To call code behind method
DocuViewareAPI.CloseDocument("docuView");
// Label text NOT getting CLEARED ????
document.getElementById('<%=docNameLbl.ClientID%>').innerHTML = "";
}
Code: Select all
public static void HandleCloseDocument(CustomActionEventArgs e)
{
// Release from memory
int imgId;
if (e.docuVieware.GetNativeImage(out imgId) == GdPictureStatus.OK)
{
GdPictureImaging gdImg = new GdPictureImaging();
gdImg.ReleaseGdPictureImage(imgId);
}
// Close the document
e.docuVieware.Close();
return;
}
Thanks a lot,
Trupti