Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1230
WebDialogWindow : Download report + hide at the same time
posted

I've done this sample :

http://ko.infragistics.com/products/aspnet/sample/infragistics-documents/export-to-pdf-or-xps

It works great and as I wanted...

My question is simple:

I have a WebDialogWindow with a button "Report" to create the report (as done in the sample)

I have a callback on the button click. 

What should I do close the WebDialogWindows AND download the report at the same time ? 

My code :

protected void DoSomethingOnReportButton(object sender, EventArgs e)

{

    GenerateReport();

    SendReport();

// Then I close the window...

    CreateRMADlg.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Hidden;

}

GenerateReport is not "important" here...

SendReport is :

Response.Clear();
Response.AppendHeader("content-disposition", "attachment; filename=" + documentFileNameRoot);
Response.ContentType = "application/octet-stream";
report.Publish(Response.OutputStream, exportFileFormat); 
Response.End();

What happened currently is that the report is well downloaded on my computer but the webDialogWindow doesn't hide.

(I suppose the Response.End() avoid the webDialog to go into hidden state)..

Being not a "asp.Net" specialist, could you tell me what I should do in order to download (working now) and hide webdialog ? 

Thanks

Parents Reply Children
No Data