ASP.NET Chartcontrols属性未显示在代码隐藏中 [英] ASP.NET Chartcontrols property not displaying in codebehind
问题描述
我正在使用ASP.NET图表控件.
但是,图表控件将不会显示任何属性.
此外,它还会给出错误,例如未定义
I am using ASP.NET Chart controls.
But,the chart controls will not displaying any property.
Also, it give error like
Type "System.Web.UI.DataVisualization.Charting.Chart" not defined.
我已经添加了上面的dll和名称空间.
但是,仍然遇到上述问题.
1.图表控件将不会显示任何属性.
2.键入"System.Web.UI.DataVisualization.Charting.Chart"未定义.
是什么问题...?
I have already added the above dll and namespace.
But, still getting the above problems.
1. chart controls will not displaying any property.
2. Type "System.Web.UI.DataVisualization.Charting.Chart" not defined.
What is the problem...?
推荐答案
检查您的web.config文件
在system.webserver>处理程序下添加或检查是否存在
check your web.config file
under system.webserver>handlers add or check if exists
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" precondition="integratedMode" verb="GET,HEAD,POST">
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</add>
也在appSettings下
also under appSettings
<add key="ChartImageHandler" value="storage=Memory;timeout=30;" />
和页面下的>控件
and under pages>Controls
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
终于在system.web> httpHandlers
中
finally in system.web>httpHandlers
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
validate="false" /></add>
这应该为您解决
this should fix it for you
这篇关于ASP.NET Chartcontrols属性未显示在代码隐藏中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!