简体   繁体   中英

The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)

I added System.Web.DataVisualization in my references folder but when I try to use it in a view like this

 <img src="/Chart/CreateChart?chartType=@(System.Web.UI.DataVisualization.Charting.SeriesChartType.Column)"

I get this error

The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)

It is, however, recognizable in my controller.

删除引用并重新添加。

我在我的项目的 bin 文件夹中复制了System.Web.DataVisualization.dll并且它确实有效。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM