I have the below asp code that I cant figure out how to convert to a C# windows application. It creates a graphical chart on a webpage, but Id like to create the chart on a windows form instead.
Thanks.
Code:
<%@ Page Language="C#"%>
// Register the control
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<script runat="server">
void Page_Load(Object sender,EventArgs e)
{
// Database Connection String
chart.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;data source=c:\mydb.mdb";
// A simple query: first column returned are the y axis values and the second column
// are the x axis values. In this case the second column returnes dates.
chart.Series.SqlStatement= @"SELECT 1 AS q, addedon FROM myusers";
// We want to group dates by year/month
chart.Series.DateGrouping = "year/month";
// Show the data as an area line.
chart.Series.Type = "AreaLine";
chart.SeriesCollection.Add();
}
</script>
<HTML><HEAD><TITLE>Orders Report</TITLE></HEAD>
<BODY>
<dotnet:Chart id="chart" runat="server"/>
</BODY>
</HTML>
Thanks.