Currently, when I want to use Microsoft Chart Controls on a website, I need to add the following onto every aspx page where I want to use it:
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
Is there any way to move this to the web.config file, so that I don’t have to put it on every page ?
Have you checked the web.config? Whenever i’ve dragged a chart control onto a page, it’s added the correct assemblies in web.config automatically. The only time it doesn’t do this is when it’s in an MVC project.
If you are using MVC, check out this post on how to integrate the charts with an MVC project