TextChanged event function not working

前端 未结 4 1340
萌比男神i
萌比男神i 2021-01-11 14:38

I have a simple aspx file

<%@ Page Language=\"VB\" AutoEventWireup=\"false\" CodeFile=\"test4.aspx.vb\" Inherits=\"test4\" %>



        
4条回答
  •  难免孤独
    2021-01-11 14:57

    Your TextBox is a server control, and text changed is a server event. It is not meant to be fired each time you type a letter, rather it is fired if the text value is different from the value at the time of the last server post back.

    If you need to run some kind of code each time a letter is pressed you will need to register and handle the client-side events OnKeyUp / OnKeyDown / OnKeyPress with VB or JavaScripting.

提交回复
热议问题