TextChanged event function not working

前端 未结 4 1352
萌比男神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:46

    You need to enable AutoPostBack on the TextBox that results in the event.

    The problem with your code is it's a server-side event trying to invoke a client-side event. The text needs to be entered in TextBox1 and then it will result in the AutoPostBack.

     
    

    Based on your need though. It may be better to populate the TextBox2 with the value from TextBox1 using JavaScript.

提交回复
热议问题