what is the alternate event of Textbox.KeyDown of Winform in WebForm in C# asp.net?

前端 未结 3 1899
青春惊慌失措
青春惊慌失措 2021-01-28 08:08

In winfrom applications i can have

textbox1.keydown 

event, but i want to achieve same thing in webform (asp.net), so how can i do that? I need

3条回答
  •  走了就别回头了
    2021-01-28 09:03

    You can use onkeydown event, which will then call your client side function. Inside the client side function, you can make an ajax call to populate data from database.

        
    
        function callMe()
        {
            $.ajax({
              url: 'URLOFTHEFUNCTION',
              type: 'GET',
              cache: false,
              success: function (result) {
                  alert(result)
              }
           });
       }
    

提交回复
热议问题