This is a migrated thread and some comments may be shown as answers.

Window download Excel File

3 Answers 463 Views
Window
This is a migrated thread and some comments may be shown as answers.
Citt
Top achievements
Rank 1
Citt asked on 06 Feb 2009, 09:39 AM
Hello,

I'am use RadWindows to send download Excel File.

I'am use this Code (C#) :
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;Filename=Export.xls");
HttpContext.Current.Response.Write(_Str_Out);
HttpContext.Current.Response.End();

After this operation, The script of RadWindow return this error :
Sys.WebForms.PageRequestManagerParserErrorException: Impossible d'analyser le message reçu du serveur. Cette erreur peut avoir plusieurs causes possibles : réponse modifiée par des appels à Response.Write(), filtres de réponse, HttpModules ou activation de trace du serveur.
Détails : Erreur d'analyse à proximité de '<?xml version="1.0"?'.

And the box for download File do not appear. 

Have you a Suggestions?  Examples?

Thanks.

Regards,
Citt_jr

Sorry for my english, I'am French.

 

 

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 06 Feb 2009, 02:49 PM
Hello Citt,

Could you please test the standard IFRAME control in such scenario? I am asking you this, because the RadWindow control is based to an IFRAME and behaves just like one.

If you don't have such problems with the IFRAME control but you continue to experience them with RadWindow, please provide more information about your exact setup.

Best wishes,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Citt
Top achievements
Rank 1
answered on 10 Feb 2009, 04:36 PM
Hello,

I don't use the standard IFRAME.

My Code in javascript for open the radwindow :
<script>
var oWnd = window.radopen(null, "DialogWindow");
oWnd.setUrl(
'Open_Xls.aspx');
oWnd.setSize(380,200);
oWnd.add_close(OnClientClose);
</script>

On ma page "Open_Xls.aspx" I'am use :
<script type="text/javascript">
window.onload = function() {
    setTimeout(
        
function() {
            $find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
    }, 200);
}
</script>
0
Fiko
Telerik team
answered on 12 Feb 2009, 12:18 PM
Hello Citt,

We checked the error message and the provided code that you posted to this thread and we are not sure that the problem is in the RadWindow control itself. Basically RadWindow is designed to replace the standard browser's popup and the control itself is based on an IFRAME.

That is why we suggested to open the page, that cause the problem, in an IFRAME or in a standard browser window ( by using window.open('Popup.aspx'); ). This should determine if the problem is in the RadWindow control itself. In case you do not experience the same problem when the page is opened in an IFRAME / browser's popup, please open a new support ticket and send us your project so we can check it. We will examine it and get back to you right away.

Kind regards,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Citt
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Citt
Top achievements
Rank 1
Share this question
or