title: How to change the text of a label?
body: <p>I have a radiobutton list and on click on the radio button item I have to change the text of its label. But for some reason it's not working. Code is below:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;asp:Label ID="lblVessel" Text="Vessel:" runat="server"&gt;&lt;/asp:Label&gt;
  
  &lt;script language="javascript"&gt;
    $(document).ready(function() {
  
      $('#rblDiv input').click(function() {
        var selected = $("#rblDiv input:radio:checked").val();
        if (selected == "exportpack") {
          $('#lblVessel').text("NewText");
        }
      });
    });
  &lt;/script&gt;
  </code></pre>