How to handle enter event of multiple text boxes which invoke input button clicks event?
<p>I have 3 asp.net text box and an html input botton, when enter is pressed in any of the above text boxes input button click event must be fired.My code is</p>

<pre><code>    &lt;li class="right2"&gt;
        &lt;asp:TextBox ID="txtPassportNumber" ClientIDMode="Static" MaxLength="20" CssClass="textEntry"
            runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;/li&gt;


    &lt;li class="left"&gt;&lt;label&gt;First Name&lt;/label&gt;&lt;/li&gt;
    &lt;li class="right2"&gt;
        &lt;asp:TextBox ID="txtFName" ClientIDMode="Static" MaxLength="20" CssClass="textEntry" runat="server"&gt;&lt;/asp:TextBox&gt;

    &lt;/li&gt;
    &lt;li class="left"&gt;&lt;label&gt;Last Name&lt;/label&gt;&lt;/li&gt;
    &lt;li class="right2"&gt;
        &lt;asp:TextBox ID="txtLName" ClientIDMode="Static" MaxLength="20" CssClass="textEntry" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;/li&gt;

    &lt;input type="button" id="btnSearch" clientidmode="Static" class="search button formbutton"
                value="Search" validationgroup="SearchPanelSubmit" runat="server" /&gt;
</code></pre>

<p>I have write the following jquery code</p>

<pre><code>$(document).ready(function () {
       if ($('#txtPassportNumber').keypress(function (e) {
            if (e.keyCode == 13)
                $('#btnBasicSearch').click();
       }));
}
</code></pre>

<p>I have used multiple if 's in jquery code but the button is not working when more then 1 text box has some text in it.How to handle enter event for multiple text boxes ?</p>
