Reputation: 25
<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!
Upvotes: 0
Views: 419
Reputation: 1929
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.
Upvotes: 3