How to fix problems with asp.net mvc 3 charts and razor pages - Digital Tool Factory blog How to fix problems with asp.net mvc 3 charts and razor pages - Digital Tool Factory blog

How to fix problems with asp.net mvc 3 charts and razor pages

The Problem: You attempt to use the super-cool new charting features in asp.net mvc 3, and all you get is compilation errors

The Cause: You are using the old school System.Web.UI.DataVisualization.Charting.Chart namespace

The Solution: Delete

using System.Web.UI.DataVisualization.Charting.Chart

and instead insert

using System.Web.Helpers;

If you are using the chart code in an actual razor page (and not in the controller), just insert

@using RazorHelpers.Helpers

into the top of the page

 

This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog

 

Written By Steve French

 

One response to “How to fix problems with asp.net mvc 3 charts and razor pages”

Leave a Reply

Your email address will not be published. Required fields are marked *






Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.