Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > RadControls in DotNetNuke > Open .docx, .xlsx, .pdf files in a new window

Not answered Open .docx, .xlsx, .pdf files in a new window

Feed from this thread
  • Hemamalini avatar

    Posted on Dec 8, 2011 (permalink)

    Hi,

        I use RadUpload for uploading/downloading files. I use the below code for downloading files in a new aspx page (separate window).

     

    //The following code writes the pdf file to the Client’s browser.

    Response.ClearContent();

    Response.ClearHeaders();

    Response.ContentType =

     

    "application/pdf";

    Response.WriteFile(strURL);

    Response.Flush();

    Response.Close();

    My files of type .pdf are downloading properly. But the contents are collapsed of file types .docx, .xlsx files,

    i have used below code for it, but it doesnt work for the above mentioned file types

    Response.ClearContent();

    Response.ClearHeaders();

    Response.ContentType =

     

     

    "application/msword";

    Response.WriteFile(strURL);

    Response.Flush();

    Response.Close();

    and

    Response.ClearContent();

    Response.ClearHeaders();

    Response.ContentType =

     

     

     

     

     

    "application/xlsx";

    Response.WriteFile(strURL);

    Response.Flush();

    Response.Close();

     

     








     

    Please guide me.


    Thanks,
    Hema.

     


    Reply

  • Bozhidar Bozhidar admin's avatar

    Posted on Dec 13, 2011 (permalink)

    Hello Hemamalini,

    Could you please provide a runnable sample page demonstrating the problem, so that we can test it locally?

    Regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > RadControls in DotNetNuke > Open .docx, .xlsx, .pdf files in a new window