title: How to dynamically set Link Button Text (also includes icon) using jQuery
body: <p>I am using Link button in asp.net Server side with two condition either Add/Edit on some condition </p>
  
  <pre><code>    if (btnAdd.Text == "&lt;span class=\"glyphicon glyphicon-floppy-disk\&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Add") 
  {do someDB update}
  else (btnAdd.Text == "&lt;span class=\"glyphicon glyphicon-edit\"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Edit")
  {do someDB update}
  </code></pre>
  
  <p>Now i want to change the text of the link button using jquery from client side reset button the code of jquery of the particular line is </p>
  
  <pre><code>$('[id*=btnAdd]').html("&lt;span class=\"glyphicon glyphicon-floppy-disk\"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Add");
  </code></pre>
  
  <p>if data already exist in db then on retreival </p>
  
  <pre><code>btnAdd.Text == "&lt;span class=\"glyphicon glyphicon-edit\"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Edit"
  </code></pre>
  
  <p>else </p>
  
  <pre><code>btnAdd.Text == "&lt;span class=\"glyphicon glyphicon-floppy-disk\&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Add"
  </code></pre>
  
  <p>now on the first time i have checked already existence data then value of btnAdd is Edit while on clicking reset button it should be "Add" but it doesn't work. </p>
  
  <p>it reset only the text of the button on front but in aspx.cs file it always show 
  btnAdd.Text value is </p>
  
  <pre><code>"&lt;span class=\"glyphicon glyphicon-edit\"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Edit"
  </code></pre>
  
  <p>please suggest the solution</p>