tags:

views:

31

answers:

1
<asp:RegularExpressionValidator 
      id="RegularExpressionValidator1"
      ControlToValidate="toAmountTextBox"
      ValidationExpression="^\d*[1-9]\d*(\.\d+)?$"
      Display="Dynamic"
      EnableClientScript="true"
      Text="* Please Enter valid amount"
      runat="server" />

This code validates but shows the error message in validation summary... I want to display the message beside the text box it is validating!

+2  A: 

Not a 100% sure about what you mean, but if you have a RegularExpressionValidator you don't want to be a part of your validation summary, you might want to look in to validationgroups.

See http://www.c-sharpcorner.com/UploadFile/DipalChoksi/valgrp_asp20_dc09212006132516PM/valgrp_asp20_dc.aspx for more info.

Ole Melhus