Stop postback on TextChanged

后端 未结 5 1662
鱼传尺愫
鱼传尺愫 2021-01-13 17:26

I have a textbox in an aspx page that has a TextChanged event attached to it. I also have a validator attached to the textbox.

When the text is changed, the validate

5条回答
  •  庸人自扰
    2021-01-13 17:36

    Add CausesValidation="true" for the text box and it will be good. If the validation is not valid there won't be any post-back.

    
    

提交回复
热议问题