How to validate alpha-numeric along-with space will be allowed in a Textbox?

 Posted by Rajesh_Kumar on 1/21/2014 | Category: ASP.NET Interview questions | Views: 2502 | Points: 40
Answer:

<asp:TextBox runat="server" Id="txt_policy_code" />


<asp:RegularExpressionValidator runat="server" id="rex_policy_code" ControlToValidate="txt_policy_code" ValidationExpression="^[a-zA-Z0-9 ]$" ErrorMessage="Only Alpha-Numeric and Space Allowed" />


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response