How to close a pop up page after retrieving binary data from Database? RRS feed

  • Question

  • User-1168518472 posted

    Hi All,

    Our support team faced the following issue:-

    From a Grid view link in a Page "A", a Popup Page "B" is opened. In the pop up page, page load method, they are retrieving binary data to open a word/excel/image.

    They are using the following code after retrieving Binary data :


    Java script - window.close();

    The word/excel/image is opened but the Popup Page "B" still remains.

    Suggest a solution to close the Popup Page "B"



    Wednesday, September 11, 2013 9:59 PM

All replies

  • User177399542 posted

    You can try this after your code gets executed: 

    Response.Write("<script language=javascript>this.window.opener = null;window.open('','_self'); window.close();   </script>");


    Thursday, September 12, 2013 12:20 AM
  • User-1168518472 posted

    Anuj, that didn't work.

    Additional info: In the pop up, there is  ajax code to show loader / processing

    Thursday, September 12, 2013 10:12 AM