jimctr

Literal Is Not Declared

Recommended Posts

I am trying out some of the demo code provided by fusion charts for ASP.net(VB). On a number of examples, I get the error that "Literal1 is not declared, when it clearly shows up as an object on the design view. I can write under the Page Load

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

Dim Literal1 As New Literal

 

Literal1.Text = GetProductSalesChartHtml()

 

End Sub

 

so the error goes away, but no data will show up on the page. I am currently working on the single series array example. Thanks

 

JC

Share this post


Link to post
Share on other sites

Hi,

 

Does your page contain a Literal Control declared ?

 

<asp:Literal ID="Literal1" runat="server"></asp:Literal>

 

Yes, it is included in the markup of the example code but is still not recognized.

 

<div class="content-area">

<div id="content-area-inner-main">

<h2 class="headline">

Plotting single series chart from data contained in Array.</h2>

<div class="gen-chart-render">

</div>

<div class="clear">

<code><asp:Literal ID="Literal1" runat="server" Text="This Text"></asp:Literal></code>

</div>

<p> 

</p>

<p class="small">

<!--<p class="small">This dashboard was created using FusionCharts XT, FusionWidgets v3 and FusionMaps v3 You are free to reproduce and distribute this dashboard in its original form, without changing any content, whatsoever. <br />

© All Rights Reserved</p>

<p> </p>-->

</p>

<div class="underline-dull">

</div>

</div>

</div>

Share this post


Link to post
Share on other sites

Hi,

 

Can you please try once running the example given in the FusionCharts XT download pack's Code > VB_NET > ArrayExample > SingleSeries.aspx ?

 

Also, if possible, can you attach here a scaled down version of the code you are trying?

 

Hi Sudipto:

 

This is exactly what I was trying to run, the SingleSeries.aspx example, without modification. I simply changed the Site.Master to point to SingleSeries.aspx instead of Default.aspx. Here is a copy of solution explorer

 

post-28609-0-51230100-1345218303_thumb.jpg

 

 

Note that what is strange about this is that even with the .dll included in the bin folder, FusionCharts is not seen. I still had to add FusionCharts.dll as a reference to the project.

 

I was able to successfully run one of the basic examples (either simplechart or basicchart) and I believe that also had used a literal, but it was easily seen.

Edited by jimctr

Share this post


Link to post
Share on other sites

Hi Sudipto:

 

This is exactly what I was trying to run, the SingleSeries.aspx example, without modification. I simply changed the Site.Master to point to SingleSeries.aspx instead of Default.aspx. Here is a copy of solution explorer

 

post-28609-0-51230100-1345218303_thumb.jpg

 

 

Note that what is strange about this is that even with the .dll included in the bin folder, FusionCharts is not seen. I still had to add FusionCharts.dll as a reference to the project.

 

I was able to successfully run one of the basic examples (either simplechart or basicchart) and I believe that also had used a literal, but it was easily seen.

 

 

So this is what I have determined so far. (Note that I have not really worked with ASP.Net before but have worked with VB.Net). If instead of creating a ASP.NET Project under Visual Studio 2010 and instead create a Web Site, I no longer get the error complaining about the Literal (Note that it appears that I can create a Project when using the Data URL method). I still don't render a chart but at least the compiler does not complain that it cannot see Literal1. I get no error messages so have no idea why the chart is not rendering. Doesn't appear that anything really even loads. Just get an enigmatic Chart. text in the middle of the screen under the title.

 

What's very strange is if I create a Project (not Website), modify the Site.Master to point to the files from which I want to render, but then purposely EXCLUDE them from the project, I do get a successful rendering of the file(s). It's as if because I have excluded them from the project, they bypass the compiler error checking, but since they are pointed to by the Site.Master markup file, they are still rendered.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

We are able to run the same demo code provided by FusionCharts XT SR4 Download Package > Code > VB_NET > ArrayExample >SingleSeries.aspx from our end.

 

Please find the attached screen shot of "not showing the error that you have specified", for your reference.

 

Could you please check whether you have imported "InfoSoftGlobal" and "System.Text" namespaces to your *.aspx.vb page correctly?

 

Also, please confirm once, whether you have included ASP.NET wrapper class, FusionCharts.dll (contained in Download Package > Code > VB_NET > Bin folder) into the project?

 

For more information on "Using FusionCharts with ASP.NET (VB) > Basic Examples", please follow the link below:

http://docs.fusionch...sicExample.html

Share this post


Link to post
Share on other sites

Hi,

 

We are able to run the same demo code provided by FusionCharts XT SR4 Download Package > Code > VB_NET > ArrayExample >SingleSeries.aspx from our end.

 

Please find the attached screen shot of "not showing the error that you have specified", for your reference.

 

Could you please check whether you have imported "InfoSoftGlobal" and "System.Text" namespaces to your *.aspx.vb page correctly?

 

Also, please confirm once, whether you have included ASP.NET wrapper class, FusionCharts.dll (contained in Download Package > Code > VB_NET > Bin folder) into the project?

 

For more information on "Using FusionCharts with ASP.NET (VB) > Basic Examples", please follow the link below:

http://docs.fusionch...sicExample.html

 

Yes,

 

I am using your demo software so InfoSoftGlobal and System.Text are imported as you have written in your provided files. Also, you can see my folder structure a few comments above to see that all the mandatory files are included along with the correct paths

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now