I am wondering what the prefered method of validating user input in asp.net using an existing method call is. I have implemented this a couple of ways now and while they all work I get the sense that there might be a better or "optimal" method?
I have an asp.net textbox
<asp:TextBox ID="myTextBox" runat="server" />
I also have a couple existing methods available to me on the objec that the form will eventually populate and save
public static bool IsNameValid()
public bool IsValid()
I'm wondering how people would wire up those items to a validation control (I'm assuming customValidator?). I'd like to avoid rewriting the validation in JavaScript (to avoid duplication of code).