ASP.NET Charting Control no longer working with .NET 4
Posted
by Moose Factory
on Stack Overflow
See other posts from Stack Overflow
or by Moose Factory
Published on 2010-04-13T16:57:17Z
Indexed on
2010/04/29
22:47 UTC
Read the original article
Hit count: 661
I've just upgraded to .NET 4 and my ASP.NET Chart Control no longer displays.
For .NET 3.5, the HTML produced by the control used to look like this:
<img id="20_Chart" src="/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0.png&g=16eb7881335e47dcba16fdfd8339ba1a" alt="" style="height:300px;width:300px;border-width:0px;" />
and now, for .NET 4, it looks like this (note the change in the source path):
<img id="20_Chart" src="/Statistics/Summary/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0.png&g=16eb7881335e47dcba16fdfd8339ba1a" alt="" style="height:300px;width:300px;border-width:0px;" />
The chart is in an MVC partial view that is in an MVC Area folder called "Statistics" and a MVC Views folder called "Summary" (i.e. "/Areas/Statistics/Views/Summary"), so this is obviously where the change of path is coming from.
All I've done is to switch the System.Web.DataVisualization assembly from, 3.5 to 4.0.
Any help greatly appreciated.
© Stack Overflow or respective owner