title: Pass label value to progress bar value property in Asp.net
body: <p>I am using a progress bar in my web project. I want to add label value getting from Code Behind to progress bar' data-percent value property. However, I am getting error such as:</p>
  <blockquote>
  <p><em>Error    217 'System.Web.UI.HtmlControls.HtmlGenericControl' does not contain a definition for 'text' and no extension method 'text'
  accepting a first argument of type
  'System.Web.UI.HtmlControls.HtmlGenericControl' could be found (are
  you missing a using directive or an assembly reference?)</em></p>
  </blockquote>
  <p>Codes are like this:</p>
  <pre><code>&lt;div class=&quot;skillbar clearfix &quot; data-percent=&quot;&lt;asp:Label ID=&quot;lblYuzde&quot; runat=&quot;server&quot;&gt;&lt;/asp:Label&gt;%&quot;&gt;
   &lt;div class=&quot;skillbar-title&quot; style=&quot;background: #c0392b;&quot;&gt;&lt;span&gt;TOPLAM&lt;/span&gt;
   &lt;/div&gt;
     &lt;div class=&quot;skillbar-bar&quot; style=&quot;background: #e74c3c;&quot;&gt;&lt;/div&gt;
     &lt;div class=&quot;skill-bar-percent&quot;&gt;&lt;asp:Label ID=&quot;lblBlogAdet&quot; runat=&quot;server&quot; Font-Bold=&quot;true&quot; ForeColor=&quot;navy&quot; Font-Size=&quot;Medium&quot;&gt;&lt;/asp:Label&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/gR3nP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gR3nP.png" alt="Screenshot of Progress Bar" /></a></p>
  <p>Would you help me please to fix the problem in a simple way?</p>