Hello,
I have a question regarding a custom validator in my page. The custom validator is located inside an update panel and this update panel is inside another upadate panel. The OnServerValidate fires and everything is fine. The problem is with ValidateEmptyText attribute. The error message is displayed as and when the user clicks on the text box and chooses some data from the popup control. I wanted this to be in such a way that the server validate should validate the text entered and not before some text was entered. Could you please give me some pointers regarding this?
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:TextBox ID="txt1" runat="server"></asp:TextBox>
<asp:CustomValidator ID="custValFromData" runat="server" Display="Dynamic" ControlToValidate="txtDate"
ErrorMessage="From month entered is invalid" OnServerValidate="custValFromData_Validate" ValidateEmptyText="true"></asp:CustomValidator>
<ajaxToolkit:PopupControlExtender runat="server" TargetControlID="txtDate" />
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
It would be of great help if somebody could help me in understanding the issue and finding a solution. Thanks in advance!
Regards, Karthik