shockwave100 Report post Posted November 18, 2008 HI All, I am trying to play around with the simple charts in asp.net but with no luck. All I get is a blank page. I have added the reference "infosoftglobal.dll" so the code can call fusion objects, but i get an error with the code file saying that: "the language of the file referenced by the codefile attribute does not match the language specified by the 'language' attribute in the current file" I guess that makes sense since the langage is in "c#" but the file behind is in vb. Really not sure whether this makes a difference. So instead of using: <%@ Page language="c#" Codebehind="BasicChart.aspx.vb" AutoEventWireup="false" Inherits="InfoSoftGlobal.GeneralPages.ASP.NET.BasicExample.BasicChart" %> <%@ Page language="c#" Codebehind="BasicChart.aspx.vb" AutoEventWireup="false" Inherits="InfoSoftGlobal.GeneralPages.ASP.NET.BasicExample.BasicChart" %> VB.net uses the following and doesn't like the "codebehind" and instead used the "codefile". Kind of confused with the "InfoSoftGlobal.GeneralPages.ASP.NET.BasicExample.BasicChart" line. What do I need to do to get this to work????????. <%@ Page language="c#" AutoEventWireup="false" CodeFile="BasicChart.aspx.vb" Inherits="BasicChart" %> < HTML> <HEAD> <TITLE>FusionCharts - Simple Column 3D Chart </TITLE> </HEAD> <body> <form id='form1' name='form1' method='post' runat="server"><% =GetMonthlySalesChartHtml()%> </form> </body> </HTML> Share this post Link to post Share on other sites
shockwave100 Report post Posted November 18, 2008 Anyone? its like smacking your head against a brick wall. Can anyone provide some good tutorials around asp.net so I can work through this myself? Share this post Link to post Share on other sites
Arindam Report post Posted November 18, 2008 Hi, Could you check your Asp.Net version and FusionCharts version first? Could you please download latest version of FusionCharts V3 pack? There have FusionCharts.dll file for Asp.net 2 Framework. There follow the path, Code folder -> C# or VB basic example. http://www.fusioncharts.com/docs/Contents/VBNET_BasicExample.html Share this post Link to post Share on other sites
shockwave100 Report post Posted November 19, 2008 Thanks Mate, I downloaded the "FusionCharts_Evaluation.zip" and extracted the fusioncharts.dll to a bin folder in the project and added it as a reference ( will that be the only file I need or will i need to extract others as well??). I removed the old "infosoftglobal.dll". I took your link and basically cut and paste this information into a new project so all the code should be intact. However when i go to load the page I get the following error here is the code. I see a sqigerly line under Namespace. When I hover over it says the the "end namespace must be matched with a preceding namespace" so I type in Namespace InfosoftGlobal. All looks good but then i back to my vb page "GetMonthlySalesChartHtml()" thows up an error saying that "get monthlysalescharthtml not declared". Pretty sure that I have the latest version of .net installed. If I dont have the preceding namespace it wont load. Is there something else I might be missing? BTW, appoligies my my noobness. Imports InfoSoftGlobal Partial Class BasicChart Inherits System.Web.UI.Page Public Function GetMonthlySalesChartHtml() As String Return FusionCharts.RenderChartHTML("../FusionCharts/Column3D.swf", "Data/Data.xml", "", "myFirst", "600", "300", False) End Function End Class End Namespace Share this post Link to post Share on other sites
Arindam Report post Posted November 19, 2008 Hi, Could you please follow this example? Example.zip Share this post Link to post Share on other sites
shockwave100 Report post Posted November 19, 2008 Thanks for your quick response Arindam, got the basic chart to work. Just a couple of things i am hoping you have a couple of minutes to explain: 1) what is the purpose of "<asp:Literal ID="Literal1" runat="server"></asp:Literal>" at line 27 on the basicchart.aspx do? 2) also what is the purpose of: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Literal1.Text = GetMonthlySalesChartHtml() End Sub 3 ) what does it mean by partial class? Thanks Again! Share this post Link to post Share on other sites
Arindam Report post Posted November 19, 2008 (edited) Hi, 1) Literal control used as a place holder for FusionCharts. I am just forcing FusionCharts to be rendered in that region. 2) Page_Load run automatically when Asp.net aspx page run and when Page_Load event called it invokes GetMonthlySalesChartHtml() and return a string redirect to Literal control. 3) When you generate Vb.Net aspx code behind program this time class must be be partial. This is a Microsoft syntax please visit Microsoft MSDN site for details. Edited November 19, 2008 by Guest Share this post Link to post Share on other sites
shockwave100 Report post Posted November 20, 2008 Cheers mate Share this post Link to post Share on other sites