2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by nmuthu_samy
0

in grid view use textbox control like this:-
<templatefiled>
<itemtemplate>label<itemtemplate>
<edittemplate>textbox<edittemplate>
</templatefield>
in textbox
use this code
<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="Date must be in the form DD/MM/YYYY"
ControlToValidate="tbDiaryDateDue"
ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"
Display="Dynamic"></asp:RegularExpressionValidator>

<asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server" ErrorMessage="Date must be in the form D/M/YYYY"
ControlToValidate="tbDiaryDateDue"
ValidationExpression="([1-9]|[12][0-9]|3[01])[- /.]([1-9]|1[012])[- /.](19|20)\d\d"
Display="Dynamic"></asp:RegularExpressionValidator>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.