ASP.NET Chart Control - During a PostBack
        Posted  
        
            by Guilherme Cardoso
        on Geeks with Blogs
        
        See other posts from Geeks with Blogs
        
            or by Guilherme Cardoso
        
        
        
        Published on Tue, 25 May 2010 14:54:00 GMT
        Indexed on 
            2010/05/25
            16:11 UTC
        
        
        Read the original article
        Hit count: 760
        
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  .

© Geeks with Blogs or respective owner