ASP Regular expression to check length of textbox value
Hi, here is a regular expression validator in ASP which you can use to check if a certain textbox has less than a certain number of characters. <asp:regularexpressionvalidator runat="server" id="lengthRegex" controltovalidate="">" validationexpression=".{1,<n>}" errormessage="Please note that there should be less than <n> number of characters in the textbox"> </asp:regularexpressionvalidator> So, if you intend to make the textbox accept a number of characters in a range(say between 5 to 10) then the following changes would work <asp:regularexpressionvalidator runat="server" id="lengthRegex" controltovalidate="">" validationexpression=".{5,10}" errormessage="Please note that there should be between 5 to 10 characters in the textbox"</asp:regularexpressionvalidator> Suppose you need to limit the characters to only alphanumerics, then use the...