title: Getting ID from asp.net runat server in jQuery
body: <p>I'm trying make some stuff in jQuery using ASP.NET. But the ID from <code>runat="server"</code> is not the same as the id used in HTML.</p>
  
  <p>I used to use this to get the ID from this situation:</p>
  
  <pre><code>$("#&lt;%=txtTest.ClientID%&gt;").val();
  </code></pre>
  
  <p>But in this case, it does not work. I'm clueless as to why.</p>
  
  <p>Javascript</p>
  
  <pre><code>/* Modal */
  function contatoModal() {
      //alert("Test");
      alert($("#&lt;%=txtTest.ClientID%&gt;").val());
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt; input runat="server" id="txtTest" value="test" /&gt;
  </code></pre>
  
  <p>Any tips?</p>