Perform Button click event when user press Enter key in Textbox

后端 未结 7 1396
情书的邮戳
情书的邮戳 2020-12-01 07:19


&         


        
7条回答
  •  甜味超标
    2020-12-01 08:13

    You can try:

    In HTML:

        
    
    

    And javascript:

    function submitButton(event) {
            if (event.which == 13) {
                $('#Button1').trigger('click');
            }
        }
    

    Code behind:

    protected void Button1_Click(object sender, EventArgs e)
    {
            //load data and fill to gridview
    } // fixed the function view for users
    

    Hope this help

提交回复
热议问题