
July 16th, 2012, 03:51 PM
|
|
Registered User
|
|
Join Date: May 2011
Posts: 10
Time spent in forums: 1 h 57 m 21 sec
Reputation Power: 0
|
|
InnerHTML issue
I've got a div tag in my .aspx file and I'm trying to populate it from within my .aspx.cs file when a button is pressed.
Here is my .aspx code
Code:
<tr> <td colspan="7"></td> </tr> <tr> <td colspan="7" align="center"> <div id="VisifireChart0" runat="server"></div> </td> </tr>
Here is my .aspx.cs code
Code:
var innerHTML = "<script type='text/javascript'> " +
"// Create Visifire object" +
"var vChart = new Visifire('Visifire/SL.Visifire.Charts.xap', 'MyChart', 500, 300);" +
"// Set Chart XAML by passing query string to Data.aspx page" +
chartXaml +
"// Render Chart" +
"vChart.render('VisifireChart0');" +
"</script>";
VisifireChart0.InnerHTML = innerHTML;
but the error I get is
C:\inetpub\wwwroot\TacticalTrading\graphSetupVisi.aspx.cs(2166,24): error CS1061: 'System.Web.UI.HtmlControls.HtmlGenericControl' does not contain a definition for 'InnerHTML' and no extension method 'InnerHTML' accepting a first argument of type 'System.Web.UI.HtmlControls.HtmlGenericControl' could be found (are you missing a using directive or an assembly reference?)
Can someone tell me what I'm doing wrong.
Thanks
Bob
|