It seems like there was no such question here before. Where can I find a templated ValidationSummary control? So I could put some html in it: div, h2 inside and a Literal with id="ValidationSummaryMessage" to render text without unnecessary list items, br. Is there any free component in the Internet? I know I could write one for my own, but I’m too lazy for it 🙂
Thanks a lot
One approach would be (even for the lazy ones 🙂 ) to iterate the validators and create your own Html message from the backend:
Or something like this (haven’t tested). It should give you full control, though you should be aware that the control order in Page.Validators is determined by the construction of the control tree during the design. The downside is that a postback is required for this to work.
Another approach would be to capture the event in jquery and add your custom tags and text there.
However, searching SO I found this solution: inherit from asp:validationsummary.