Note that there are some explanatory texts on larger screens.

plurals
  1. PORender Dundas control with dynamic markup
    primarykey
    data
    text
    <p>Im using VS 2005 and I want to find the best way to create a Dundas chart dynamically. In my codebehind, I have a procedure that creates the markup tags for a Dundas chart. When the page renders, it doesnt display anything but the view code shows the tags for the chart.</p> <p>I know its probably something with the rendering of html in the whole .net process. What is the best way to do this? Ive created dynamic controls in various ways, but this seems to be a little different since Im building a string and then trying to render. Below is the basic code that is run when a user clicks a button on the page.</p> <pre><code> string dundasXML = ""; dundasXML = "&lt;DCWC:CHART id='Chart1' runat='server' RenderType='InputTag' ImageType='Png' &gt;"; dundasXML += "&lt;Series&gt;"; dundasXML += "&lt;dcwc:Series ChartType='SplineArea' Name='Series1'&gt;"; dundasXML += "&lt;Points&gt;"; dundasXML += "&lt;dcwc:DataPoint YValues='6'&gt;&lt;/dcwc:DataPoint&gt;"; dundasXML += "&lt;dcwc:DataPoint YValues='9'&gt;&lt;/dcwc:DataPoint&gt;"; dundasXML += "&lt;dcwc:DataPoint YValues='3'&gt;&lt;/dcwc:DataPoint&gt;"; dundasXML += "&lt;/Points&gt;"; dundasXML += "&lt;/dcwc:Series&gt;"; dundasXML += "&lt;/Series&gt;"; dundasXML += "&lt;ChartAreas&gt;"; dundasXML += "&lt;dcwc:ChartArea BorderColor='' Name='Default' BackColor='Transparent'&gt;"; dundasXML += "&lt;/dcwc:ChartArea&gt;"; dundasXML += "&lt;/ChartAreas&gt;"; dundasXML += "&lt;/DCWC:CHART&gt;"; LiteralControl l = new LiteralControl(dundasXML); myPanel.Controls.Add(l); </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.
    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