urwithat Posted April 28, 2009 Report Share Posted April 28, 2009 Hi,I have an issue, where the event of Post Paint is not invoking from remote machine call.Below is the code: // Gloabal Variable.Chart chart1 = new Chart();protected void Button_Click(object sender, EventArgs e){ // Creating Event for a dynamic chart. chart1.PostPaint += new CustomPaintEventHandler(Chart1_PostPaint); fileStream = new System.IO.FileStream(Path, System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite); imgMapText = System.IO.File.CreateText(Path); htmlTag = System.IO.File.CreateText(Path); chart1.ImageSettings.ToolTips = ImageToolTipStyle.AsTitle; chart1.ID = "Chart"; chart1.Width = 320; chart1.Height = 80; chart1.RenderFormat = "bmp"; // Genrating the image. chart1.RenderToStream(fileStream, imgMapText, htmlTag);}protected void Chart1_PostPaint(object sender, CustomPaintEventArgs e){ // Some Design.} I have added the above code, when it executes on my local system after the "chart1.RenderToStream(fileStream, imgMapText, htmlTag);" the Post Paint event used to be triggered. But this seems not to be the case when the code is added into IIS and run from a remote system.I have tried many other way, but unfortunatly unsuccessfull as yet.I had tried to invoke the Post Paint method:chart1.PostPaint += new CustomPaintEventHandler(Chart1_PostPaint).Invoke(chart1, new CustomPaintEventArgs());ANDthis.Chart1_PostPaint(chart1, new CustomPaintEventArgs());Unfortunatly CustomPaintEventArgs has been sealed due to which we cant access the consturtor for our means.If your sure on how to rectify such an issue please leave a comment.Thanks & Regards..aT.. Quote Link to comment Share on other sites More sharing options...
urwithat Posted May 26, 2009 Author Report Share Posted May 26, 2009 This issue is due to Chart FX Trial version, once purchased the issue got resolved at my end.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.