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

Radchart save problem

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kishor
Top achievements
Rank 2
Kishor asked on 10 Jul 2013, 04:24 AM
hello 

I want to export RadChart to excel so first Iam saving it.

following is my code

 Protected Sub btnSaveChart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveChart.Click
        Try

            Dim ms As New System.IO.MemoryStream
            RadChart1.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
            Page.Response.Clear()
            Page.Response.ClearHeaders()
            ' Page.Response.AddHeader("Content-disposition", "attachment; filename=Chart.png")
            Page.Response.AddHeader("Content-type", "image/png")
            Page.Response.BinaryWrite(ms.ToArray())
            Page.Response.End()

        Catch ex As Exception

        End Try
       
    End Sub

But it does not work  , it gives following error

  Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '�PNG



please help me
waiting for reply

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 11 Jul 2013, 08:44 AM
Hello,

Could you please send us a small runnable copy of your project reproducing the issue so we could debug it locally. You can open up a support ticket and attach the sample there.

You could also take a look at the Code Library here as it might help you in figuring out what is causing the issue.

Regards,
Peshito
Telerik
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 the blog feed now.
Tags
General Discussions
Asked by
Kishor
Top achievements
Rank 2
Answers by
Peshito
Telerik team
Share this question
or