teechart problem(TeeChart Pro v7 ActiveX Control)

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
w6p2
Newbie
Newbie
Posts: 14
Joined: Thu Dec 29, 2005 12:00 am
Contact:

teechart problem(TeeChart Pro v7 ActiveX Control)

Post by w6p2 » Mon Apr 03, 2006 5:50 am

can anyone give me a example about how to use the teechart in asp.net?
i had seen the installed-examples. but i still confused about it.

my steps as below:
1. open a new asp.net application (vs2003)
2.place a teechart activex control in html page.(id=TChart1)
3.add in the following code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim TChart1 As New TeeChart.TChart
TChart1.AddSeries(TeeChart.ESeriesClass.scLine)
TChart1.Series(0).FillSampleValues(15)
end sub
-----------------------
but i can't see anything in the teechart after executing this program.

and how to connect to the database in programming

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Apr 03, 2006 3:18 pm

Hi,

As TeeChart ActiveX is not an ASP.NET control it doesn't admit runat="server". When the value is runat="server", this attribute specifies that the code contained within the script block runs on the server and not the client. This attribute is required for server-side code blocks. For further information please read .NET Framework's [url=ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/dv_ASPNETgenref/html/fbf5f4c0-5ee6-4f94-b3e8-cdc1dafa7199.htm]Code Declaration Blocks[/url].

To have TeeChart ActiveX working in a ASP.NET application, please look at the example in C:\Program Files\Steema Software\TeeChart Pro v7 ActiveX Control\Examples\Visual Studio .NET\VBWebForm, genchart.aspx.vb creates a chart with a series and exports it to a memory stream. Then Webform1.aspx, has a VB script which on its OnLoad method imports that previously stored chart.

This is the way that has to be done, creating a chart at the server and exporting it to the client.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply