Geeks With Blogs
Guilherme Cardoso, Blog EN .NET geek

To use the Chart control from a PostBack is necessary to modify the ChartImg.axd HttpHandler, otherwise we'll get the error message: Error executing child request for ChartImg.axd

In Web.Config search the line:

 <add path = "ChartImg.axd" verb = "GET,HEAD" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" <Add path = "ChartImg.axd" verb = "GET, HEAD" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 " 
 validate = "false" /> Validate = "false" /> 

  Change to:

 <add path = "ChartImg.axd" verb = "GET,HEAD,POST" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" <Add path = "ChartImg.axd" verb = "GET, HEAD, POST" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version = 3.5.0.0, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35 " 
 validate = "false" /> validate = "false" /> 

The attribute that we are adding is the Post.
 For those not familiar with this control is very useful for creating graphics. You can see more information here .

 

Posted on Tuesday, May 25, 2010 3:54 AM | Back to top


Comments on this post: ASP.NET Chart Control - During a PostBack

# re: ASP.NET Chart Control - During a PostBack
Requesting Gravatar...
This is kinda complicated but thanks for sharing though. I didn't know that control is useful for graphics. - Kyle Thomas Glasser
Left by Jennifer Smith on Feb 16, 2012 3:20 AM

Your comment:
 (will show your gravatar)


Copyright © Guilherme Cardoso | Powered by: GeeksWithBlogs.net