title: how to use asp.net id in jquery
body: <p>How to overwrite html code to asp.net code for jquery?</p>
  
  <p>HTML is:</p>
  
  <pre><code>&lt;textarea id="test"&gt;&lt;/textarea&gt;
  &lt;span id="showResult"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Jquery is:</p>
  
  <pre><code>$('#test').keyup(function(e){
  var s = $(this).val();
  var ss = s.slice(-1); 
  var result = '';
  if(ss.search(/[^\x00-\x7E]/) != -1) result = 'fa'; else result = 'en';
  $('#showResult').html(result);
  });
  </code></pre>
  
  <p>Up Code Worked!</p>
  
  <p>But Use With Asp.net Don't Work:</p>
  
  <p>Aspx is:</p>
  
  <pre><code>&lt;asp:TextBox runat="server" ID="txtMessege"&gt;&lt;/asp:TextBox&gt;
  &lt;span id="showResult"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Jquery is:</p>
  
  <pre><code>$('#&lt;%= txtMessege.ClientID %&gt;').keyup(function () {                
  var s = $(this).val();
  var ss = s.slice(-1); 
  var result = '';
  if (ss.search(/[^\x00-\x7E]/) != -1) result = 'fa'; else result = 'en';
  $('#showResult').html(result);
  });
  </code></pre>