IE9 and Safari Compatibility

Thread is closed for posting
5 posts, 0 answers
  1. 79E332FD-4467-48A2-94C9-54FE39BA0EE5
    79E332FD-4467-48A2-94C9-54FE39BA0EE5 avatar
    3 posts
    Member since:
    Sep 2013

    Posted 15 Jun 2015 Link to this post

    Requirements

    Telerik Product and Version

    2015.1.401

    Supported Browsers and Platforms

    IE 9 and Safari

    Components/Widgets used (JS frameworks, etc.)



    PROJECT DESCRIPTION 

    The RadClientExportManager relies on the File API for exporting. Since IE9 and Safari browsers do not support File API, in order to export content, the browser needs to make a request to the server and receive back the data. This functionality is achieved by assigning an exporting service to the RadClientExportManager ProxyURL.

    The attached sample uses this approach to export the content of an HTML div element to a PDF file.

  2. FC122C83-14C1-4432-805D-C462DB0E6863
    FC122C83-14C1-4432-805D-C462DB0E6863 avatar
    12 posts
    Member since:
    Dec 2007

    Posted 08 Jul 2015 Link to this post

    Dmitar,

    Can you provide Sample Code Using Webservice instead of WCF service,

    I tried creating the Service.asmx and created the Export method but no luck.

    Below is the WebMethod with Modified Code,

     

             [WebMethod]
            public Stream Export(Stream input)
            {
                StreamReader sr = new StreamReader(input);
                string s = sr.ReadToEnd();
                sr.Dispose();
                NameValueCollection qs = HttpUtility.ParseQueryString(s);
                string fileName = qs["fileName"];
                string base64 = qs["base64"];
                string contentType = qs["contentType"];

                byte[] data = Convert.FromBase64String(base64);

                MemoryStream stream = new MemoryStream(data);
                HttpContext.Current.Response.ContentType = contentType;
                stream.Position = 0;
                return stream;
            }

    Below is the change in the ASPX Page,

            protected void Page_Load(object sender, EventArgs e)
            {
                var relativePath = "~/service.asmx/export?file";

                RadClientExportManager1.PdfSettings.ProxyURL = ResolveUrl(relativePath);
                RadClientExportManager1.PdfSettings.Author = "Telerik ASP.NET AJAX";
            }

     

     Let me know if I need to make any other changes,

     

    Thanks in Advance

     

  3. 79E332FD-4467-48A2-94C9-54FE39BA0EE5
    79E332FD-4467-48A2-94C9-54FE39BA0EE5 avatar
    3 posts
    Member since:
    Sep 2013

    Posted 08 Jul 2015 in reply to FC122C83-14C1-4432-805D-C462DB0E6863 Link to this post

    Hi Khadeer,

    You may find a solution which does not use WCF or WebAPI in the following forum post, dealing with the same IE9 and Safari Compatibility topic. Please check if it is OK for your scenario.

    Regards,
    Dimitar

  4. FC122C83-14C1-4432-805D-C462DB0E6863
    FC122C83-14C1-4432-805D-C462DB0E6863 avatar
    12 posts
    Member since:
    Dec 2007

    Posted 09 Jul 2015 Link to this post

    Hey Dimitar,

    Thanks Lot it worked  :)

    Also I need to export the data which is binded to the chart in Excel.

    Currently I'm exporting the Dataset into an Excel.

     Is there any other way to export in Excel.

     Regard
    Khadeer

     

  5. 79E332FD-4467-48A2-94C9-54FE39BA0EE5
    79E332FD-4467-48A2-94C9-54FE39BA0EE5 avatar
    3 posts
    Member since:
    Sep 2013

    Posted 09 Jul 2015 Link to this post

    Hi Khadeer,

    I'm glad that the forum solution worked for you.

    Since your latest question is not related to the main topic of this code library, I would suggest you to open a new support ticket/forum thread for it. Thus, threads would be kept short and concise, providing better support for the community.

    Thank you in advance for your understanding.

    Regards,
    Dimitar

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.