Error in passing the hidden values to JavaScript in asp.net <p>Problem with passing values to Javascript, am I going wrong in passing the value pls help.</p> <pre><code>var percentage= parseInt(document.getElementById("&lt;%=hid_Percentage.ClientID%&gt;").value); var color = document.getElementById("&lt;%=hid_Color.ClientID%&gt;").value; var progress1 = new RGraph.VProgress('progress1', percentage, 100); progress1.Set('chart.colors', [color]); progress1.Set('chart.tickmarks', false); progress1.Draw(); </code></pre> <p>I have 2 hidden fields</p> <pre><code> &lt;asp:HiddenField ID="hid_Percentage" runat="server" /&gt; &lt;asp:HiddenField ID="hid_Color" runat="server" /&gt; </code></pre> <p>And this is how I pass value to the hidden field in code behind in asp.net</p> <pre><code> double value = (read * 100 / count); string vProgressColor = "'#e01600'"; hid_Percentage.Value = Convert.ToString(value); hid_Color.Value = vProgressColor; </code></pre> <p>The value for percentage is passed correclty as the graph is drawn using that value. But the color is emply. it is not getting the color.,</p>