开发者

Linking specific asp RequiredFieldValidators to specific asp buttons

开发者 https://www.devze.com 2023-03-12 16:39 出处:网络
I have a ASP.NET page. Which has 3 buttons. Button1 should do a post-back once dateinput1, dateinput2 are validated.

I have a ASP.NET page. Which has 3 buttons. Button1 should do a post-back once dateinput1, dateinput2 are validated. Button2 should do a ajax call to its onclick event once textbox1 is validated. Button3 should do a ajax call to its onclick even once textbox2 is validated.

Now what I did was placed the asp:RequiredFieldVal开发者_如何学Pythonidator and linked them the controls they need to validate.

Now whats happening is when I click Button1, it is also checking for validation of textbox1 and textbox2. Which it should not do. How do I do this??

Thanks in advance.

regards Yash


You should assign different ValidationGroups to your controls.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号