title: Pass parameters to jquery function on onclick
body: <p>I am trying to pass a parameter to my jquery function through the onclick event of a textbox. This is the code:</p>
  
  <p>HTML Code:</p>
  
  <pre><code>&lt;asp:TextBox ID="txtLoginName" OnClick='timepass(&lt;%# Eval("userid")%&gt;);' Text='&lt;%# Eval("LoginName")%&gt;'
                                  runat="server"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>and my jquery function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          function timepass(pass) {
              alert(pass);
  }
  </code></pre>
  
  <p>but nothing happens. When I pass like this on onclick event <code>OnClick="timepass(123)"</code> it works fine.
  What am I doing wrong?</p>