1

Aspx code

<asp:TextBox type="text" onkeydown="keyPressed(event, 'txtSearch');" class="form-control" runat="server" ID="txtSearch">
</asp:TextBox>

Js Code

function keyPressed(e, id) {
  if (e.keyCode == 13) {
    var id = '<%= btnSearch.ClientID%>';
    $('#' + id).click();
  }
}

please suggest why it not working.Thanks in advance

Umang Patwa
  • 2,795
  • 3
  • 32
  • 41
Nandu
  • 11
  • 3

0 Answers0