Note that there are some explanatory texts on larger screens.

plurals
  1. POhow do you pull XML data from a C# file
    primarykey
    data
    text
    <p>If I have XML data in a C# file, instead of using setXMLUrl(/blah.blah.xml); to retrieve the XML information from an XML file, what function or code do I need to pull XML data from a C# file that is used in ASP.net?</p> <p>This is what the code is:</p> <pre><code>myChart.setXMLUrl("/Controls/TaskOrder/TaskSummary.asc/TaskSummary.ascx.cs"); </code></pre> <p>I am rendering a chart so in the setXMLUrl(""); area is where the data is being read from. Usually it is from an XML file like this:</p> <pre><code>myChart.setXMLUrl("data/data.XML"); </code></pre> <p>but since my XML data is appended in a C# file, I can't use setXMLUrl since it is not referencing XML directly.</p> <p>Here is an updated look at the code behind:</p> <pre><code> public void SetLine3Chart(DataSet exDT) { StringBuilder xmlData = new StringBuilder(); xmlData.Append("&lt;chart caption='Current Period: Total Months: 12' chartBottomMargin='8' chartTopMargin='04' captionPadding='01' xAxisNamePadding='-20' yAxisNamePadding='05' chartRightMargin='20' showBorder='0' yAxisName='' xAxisName='' numberPrefix='$' formatNumberScale='0'&gt;"); xmlData.Append("&lt;categories&gt;"); xmlData.Append("&lt;category label='January'/&gt;"); xmlData.Append("&lt;category label='February'/&gt;"); xmlData.Append("&lt;category label='March'/&gt;"); xmlData.Append("&lt;category label='April'/&gt;"); xmlData.Append("&lt;category label='May'/&gt;"); xmlData.Append("&lt;category label='June'/&gt;"); xmlData.Append("&lt;/categories&gt;"); xmlData.Append("&lt;dataset seriesName='Budget Spent' &gt;"); xmlData.Append("&lt;set value='3478'/&gt;"); xmlData.Append("&lt;set value='2557'/&gt;"); xmlData.Append("&lt;set value='5379'/&gt;"); xmlData.Append("&lt;set value='4987'/&gt;"); xmlData.Append("&lt;set value='1790'/&gt;"); xmlData.Append("&lt;set value='6367'/&gt;"); xmlData.Append("&lt;/dataset&gt;"); xmlData.Append("&lt;dataset seriesName='Average Spending' renderAs='Line'&gt;"); xmlData.Append("&lt;set value='4375'/&gt;"); xmlData.Append("&lt;set value='4675'/&gt;"); xmlData.Append("&lt;set value='6354'/&gt;"); xmlData.Append("&lt;set value='7648'/&gt;"); xmlData.Append("&lt;set value='4578'/&gt;"); xmlData.Append("&lt;set value='4763'/&gt;"); xmlData.Append("&lt;/dataset&gt;"); xmlData.Append("&lt;styles&gt;"); xmlData.Append("&lt;definition&gt;"); xmlData.Append("&lt;style name='Font_0' type='font' font='Arial' size='12' color='666666' rightMargin='15' /&gt;"); xmlData.Append("&lt;/definition&gt;"); xmlData.Append("&lt;application&gt;"); xmlData.Append("&lt;apply toObject='CAPTION' styles='Font_0'/&gt;"); xmlData.Append("&lt;/application&gt;"); xmlData.Append("&lt;/styles&gt;"); xmlData.Append("&lt;/chart&gt;"); Literal9.Text = FusionCharts.RenderChart("/Dashboard/Charts/MSCombi2D.swf", "", xmlData.ToString(), "line3Chart", "100%", "100%", false, false); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload