Wednesday, November 16, 2011

Spaces are not allowed!

<asp:RegularExpressionValidator ID="rev" runat="server" ControlToValidate="txtBox" 
   
ErrorMessage="Spaces are not allowed!" ValidationExpression="[^\s]+" /> 
<asp:RequiredFieldValidator ID="rfv" runat="server" ControlToValidate="txtBox"  
   
ErrorMessage="Value can't be empty" /> 

No comments:

Post a Comment