在执行两个ASP.NET图表控件后,控件不会进入代码隐藏 [英] Controls not getting in codebehind after taking two ASP.NET chart control
问题描述
我想在仪表板上显示两个图表。当我为销售状态添加一个asp.net图表控件时没有。订单它正常工作,但在设计中添加其他图表控件后,我没有在vb.net中的代码隐藏代码中获得两个控件。
设计
< asp:Content ID =Content2ContentPlaceHolderID =IBSContentPlaceHolderRunat =Server>
< asp:UpdatePanel ID = UpdatePanel1runat =server>
< contenttemplate>
I want to show two charts on dashboard. when I add one asp.net chart control for sales Status vs no. of orders it works properly but after adding other chart control in design , I'm not getting both controls in codebehind code in vb.net.
Design
<asp:Content ID="Content2" ContentPlaceHolderID="IBSContentPlaceHolder" Runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<table>
<tbody>
<tr>
<td style="padding-bottom: 3px">
<asp:Chart ID="ChartSales" runat="server" Width="600px" Visible = "True">
<titles>
<asp:Title ShadowOffset="3" Name="Items" />
<legends>
<asp:Legend Alignment="Center" Docking="Right" IsTextAutoFit="False" Name="Default"/>
<series>
<asp:Series Name="Default" ChartArea="ChartArea1" />
<chartareas>
<asp:ChartArea Name="ChartArea1" BorderWidth="0">
</td>
<td>
<asp:Chart ID="ChartPurchase" runat="server" Width="350px" Visible= "True">
<titles>
<asp:Title ShadowOffset="3" Name="Items" />
<legends>
<asp:Legend Alignment="Center" Docking="Right" IsTextAutoFit="False" Name="Default" LegendStyle="Column" />
<series>
<asp:Series Name="Default">
<chartareas>
<asp:ChartArea Name="ChartArea2" BorderWidth="0">
</td>
</tr>
</tbody>
</table>
我的尝试:
在页面指令中而不是CodeFile之后使用CodeBehind属性,在代码隐藏中获得控制但在运行之后会出现Parser错误:
'无法加载类型'ContentPages_MainPage''
What I have tried:
In page directive instead of CodeFile Use CodeBehind attribute after that , getting control in codebehind but after running it gives Parser error:
' Could not load type 'ContentPages_MainPage''
推荐答案
删除临时文件&重新启动Visual Studio它正常工作。
After deleteing temp files & restarting Visual Studio it Works properly .
这篇关于在执行两个ASP.NET图表控件后,控件不会进入代码隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!