开发者

How to show custom error message in ValidationSummary directly (without validator)?

开发者 https://www.devze.com 2023-03-25 02:37 出处:网络
Can I set custom message to the ValidationSummary control? I\'ve got Delete button in the edit page. I want if the validation fai开发者_如何学编程l to set the error message in the validation summery

Can I set custom message to the ValidationSummary control?

I've got Delete button in the edit page. I want if the validation fai开发者_如何学编程l to set the error message in the validation summery to prevent putting another label with red style.

I think using CustomValidator is not a good idea in my case, because there is no validation on delete, the error message should be shown after failing the action itself.

Any help!


you can use validation group property to specify which group of controls is validated on validation.you may not add delete button to that group.so clicking on delete will not fire validation.

for custom message try this Custom Message in Validation Summary

0

精彩评论

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