views:

45

answers:

1

Hello,

I've found a nice article on how to create Chart progammaticaly in ASP.NET MVC on ASP.NET website. Scott Mitchell, the author, uses a class called Chart() that he said comes from system.web.UI.datavisualization. But, when I try to reference system.web.UI.datavisualization namespafe from my projet,looking at the .NET tab, I don't see it. Instead, I find system.web.datavisualization (without UI between System and DataVisualization).

I wonder if we are talking about the same namespace. If that's not the case, where can I find the system.web.UI.datavisualization and how to install it?

Thanks for helping.

+1  A: 

The Chart class is located in the System.Web.UI.DataVisualization.Charting namespace (there is UI here) in the System.Web.DataVisualization.dll assembly (no UI here).

alt text

The .NET tab of the Add Reference window shows a list of assemblies (not namespaces), so you will see System.Web.DataVisualization (not System.Web.UI.DataVisualization.Charting) there.

Marek Grzenkowicz
I have VS2008 professional and VS2010 express (for now). VS2010 has .NET 4.0 by default.
Richard77
@Marek. That's actualy the purpose of my question. I don't see on the .NET tab the one with UI in between. Are you confirming that those 2 namespaces are totaly different? In that case, I guess you've answered the first part of my question. Here's the second part: If those 2 are different, then where do I find the one with the UI?
Richard77
@Richard77 They are not two different namespaces - only one of them is a namespace; the other is an assembly.
Marek Grzenkowicz
@Marek: I'm sorry, I couldn't get back to you the whole week end. Thanks for your answer. I think I was confused because, Everything fall back in place when I use .NET 3.5. but not in .NET 4.0. So, I'll post something new.
Richard77
@Marek. I see why things where not working. In fact, while scanning the .NET tab, I saw twice "System.Web.UI.DataVisualisation". So, I was picking the first one, which, in fact, was not showing completely. The first one is "System.Web.UI.DataVisualisation.Design", which is different from "System.Web.UI.DataVisualisation." The second one is "System.Web.UI.DataVisualisation". Picking it solves everything. I need to pay attention now. Thanks.
Richard77