Close a Document from JS & Code behind !!

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
Posts: 4
Joined: Tue Apr 25, 2017 9:04 pm

Close a Document from JS & Code behind !!

Post by trupti » Thu Jun 01, 2017 8:00 pm


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

            // Label text NOT getting CLEARED ????
            document.getElementById('<%=docNameLbl.ClientID%>').innerHTML = "";
Code Behind :

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();

            // Close the document
Why is this difference between js & code behind ?? I just want to release the memory. Is their any other way to achieve the same ??

Thanks a lot,


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest