I am looking for the best practice for validating a form.
I have worked with the asp.net validation controls in the past, but I cant say I'm too fond of them. I personally feel they complicate the aspx page itself and are not that flexible in terms of coloring or displaying certain notifications for the user. I like full control in case changes need to be made in the future.
I have worked with custom validation in the past. Wrote my own methods and returned the page with the appropriate error message/coloring if needed. But I'm not sure it was the best design. Should I write my methods in the page code file itself and acces the controls and the page directly, should I make a business object and give the values as parameters to a function and return errormessages?
I cant seem to find a good design for my validation.
What do you use? The asp.net controls? A custom way of validation? And if custom how do you implement it?
Thanks