ASP.NET Custom Validator Client side & Server Side validation not firing

前端 未结 7 1589
梦毁少年i
梦毁少年i 2020-12-12 20:16

This has not happened to me before, but for some reason both the client and server side validation events are not being triggered:



        
7条回答
  •  萌比男神i
    2020-12-12 20:58

    Client-side validation was not being executed at all on my web form and I had no idea why. It turns out the problem was the name of the javascript function was the same as the server control ID.

    So you can't do this...

    
    
    

    But this works:

    
    
    

    I'm guessing it conflicts with internal .NET Javascript?

提交回复
热议问题