简体   繁体   中英

Logout button calls validation conrols in asp.net, how to avoid calling validations on click of Log out button?

I design a web form having some text box control,dropdown list control, radio button control,recaptcha control, and one submit button with asp button control. And I added a Link button with asp Link button control in right hand side up corner as log out button. The problem is even i press logout button the error validation controls of that page is being called, but it should be called only on submit button. Please check out my snap shots. Please help me regarding this, Thank you so much.. 见右手边了角落里,有是注销按钮 看到提交按钮“ADD HOD” 所有的错误验证控件被称为点击退出按钮后,它应该被称为只有提交按钮(ADD HOD)

只需在按钮上添加此属性:

CausesValidation="False"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM