Eloff Posted April 11, 2003 Posted April 11, 2003 I have the below asp code that I can't figure out how to convert to a C# windows application. It creates a graphical chart on a webpage, but I'd like to create the chart on a windows form instead. <%@ 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. Quote
*Experts* Bucky Posted April 12, 2003 *Experts* Posted April 12, 2003 If the Chart control (I'm assuming it's a 3rd-party control) is a Web control, then you can't use it in a Windows Forms project. They are two totally separate entities. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
steved Posted April 14, 2003 Posted April 14, 2003 Yup. Sorry, Eloff, but you're out of luck until dotnetcharting makes a Windows Forms version of their control. Since you're already buying 3rd-party controls, though, there are plenty other alternatives in the COM and .NET worlds for you. :) http://www.windowsforms.net/ControlGallery/default.aspx?Category=25&tabindex=9 (Some of those might even be free, I haven't looked at them all.) .steve Quote zig?
JIMcFadyen Posted April 14, 2003 Posted April 14, 2003 If you are up to it then the MSChart ActiveX control is still available. John Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.