title: Editing elements style asp.net
body: <p>So I have a progress bar which has an initial width which in this case is 40% and also an aria-valuenow="40":</p>
  
  <pre><code>&lt;div class="progress"&gt;
   &lt;div id="progress_bar" runat="server" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:40%"&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However when a user clicks a button I want to increment the width and the aria-valuenow to 50, is this possible in the code behind? So far I have:</p>
  
  <pre><code>protected void addTen_btn_Click(object sender, EventArgs e)
  {
    progress_bar.Style.Add("width", 50);
  }
  </code></pre>
  
  <p>Surely my code is just constantly adding a new attribute? I just want to edit the current attribute </p>