I’m trying to use the Chart control in asp.net 4.0. While I know it required a separate install as part of 3.5, it’s included by default with 4.0.
I can see the Chart control in my toolbox, and I can drag it to my designer and see a preview of the chart. However, when I try to compile my website, I get an error stating:
The type or namespace name ‘DataVisualization’ does not exist in the namespace ‘System.Web.UI’ (are you missing an assembly reference?)
I receive the same error when I take a brand new page and add the following:
using System.Web.UI.DataVisualization;
Any ideas? I can understand why I would get this error in 3.5, but no clue why I would receive in 4.0, especially when I can see the control in the toolbox.
When I upgraded my website from .net 3.5 to 4.0, some of the references in my web.config didn’t automatically get updated to 4.0. After I manually updated them, everything worked.