Error while creating chart using c# asp.net

PQracheal

New Member
Hi this my first time I'm trying to create a chart and I have an error, so can any one help me please ? This is the code ( I'm using line chart ) : \[code\]protected void Page_Load(object sender, EventArgs e) { Chart1.ChartAreas.Add("chtAres"); Chart1.ChartAreas[0].AxisX.Title = "Category Name"; Chart1.ChartAreas[0].AxisX.TitleFont = new System.Drawing.Font("Verdana", 11, System.Drawing.FontStyle.Bold); Chart1.ChartAreas[0].AxisY.Title = "UnitPrice"; Chart1.ChartAreas[0].AxisY.TitleFont = new System.Drawing.Font("Verdana", 11, System.Drawing.FontStyle.Bold); Chart1.ChartAreas[0].BorderDashStyle = ChartDashStyle.Solid; Chart1.ChartAreas[0].BorderWidth = 2; Chart1.Legends.Add("UnitPrice"); Chart1.Series.Add("UnitPrice"); Chart1.Series[0].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Line; Chart1.Series[0].Points.DataBindXY(result.DefaultView, "CategoryName", result.DefaultView, "UnitPrice"); }}\[/code\]and this is the Error Source Error: \[quote\] Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication3.Global" Language="C#" %>\[/quote\]
 
Back
Top