I added reference to the System.Web.DataVisualization to my MVC project.
Now when I try to add the namespace to my web.config I am getting error
CS0234: The type or namespace name ‘DataVisualization’ does not exist in the namespace ‘System.Web.UI’ (are you missing an assembly reference?)
So then I try to use the same in my controller. This works perfectly.
using System.Web.UI.DataVisualization;
Then the same should work in my Razor view
So I try to use this in my Razor view
@using System.Web.UI.DataVisualization;
This again not not work giving me the same error
How come I can use the namespace in my controller and not in my views?
Am I missing something…
If you go to the project references, go to properties on “System.Web.DataVisualization,” then set “CopyLocal” to true, you’ll then be able to put
in your Razor view.