<script type="text/javascript">
        document.onkeydown = function (e) {
            var theEvent = window.event || e;
            var code = theEvent.keyCode || theEvent.which;
            if (code == 13) {
                $("#btnQuery").click();
            }
        } </script>

$(":input").bind("keyup", function (event) {
                if (event.keyCode == "13") {
                    $("#btnQuery").click();
                }
            })