Need Client Side Validation for TextBox if '<' and '>' are used in textbox ASP.NET
问题 Could you please Suggest a client Side Validation for the TextBox in ASP.NET. Needs validation and should not allow user to use '<>'. When text is entered between '<' and '>', it should show validation 回答1: You can do this using CustomValidator <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:CustomValidator runat="server" id="customvalidator1" ControlToValidate="TextBox1" EnableClientScript="true" ErrorMessage="Cannot accept- < or >" ClientValidationFunction="jsvalidate" />