title: Change a Javascript variable value from code behind
body: <p>I have this javascript code:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
      var progValue1 = 100;
      var progValue2 = 30; 
      $("#progressbar").progressbar({ value: progValue1});
      $("#progressbar2").progressbar({ value: progValue2 });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I would like to change the values of the two variables (<code>progValue1</code> and <code>progValue2</code>) from the code behind when a button is clicked ..... </p>
  
  <p>This is the code for the button</p>
  
  <pre><code>&lt;asp:Button ID="btnConfirm" CssClass="button" SkinID="Common" runat="server" Text=  "Confirm" OnClick="btnConfirm_Click" /&gt;
  </code></pre>
  
  <p>How can I change those values from the C# code for the <code>btnConfirm</code> method?</p>