In a C# 2010 webform application I am working on a couple of custom validators. One of the validators needs to look at a sql server 2008 r2 database to find the lowest and highest value for a create date field.
My question is how to setup a customer error message that can be generated. Basically I would like the error message to say the create date needs to be within a certain date range. I would do not want to say the create date requested values is not contained in the specific table.
Thus can you tell me how to setup a custom error message that the custom validator can use?
Loading
scampercatPosted Jun 24, 2012, 5:05 PM
<asp:CustomValidator ID="CustValidatePayDate" CssClass="errorStyle" runat="server" Display="Dynamic"
ControlToValidate="" OnServerValidate="ValidatePaymentDate" ErrorMessage="Payment Date invalid" />
div>
Suthish NairPosted Jun 24, 2012, 4:40 PM