web user control details:
<asp:CustomValidator ID="cvServerValidateDate" runat="server"
ControlToValidate="tbDate" onservervalidate="cvValidateServer"
ValidateEmptyText="True" ClientValidationFunction="validateDateControl"></asp:CustomValidator>
iv>
<script type="text/javascript">
function validateDateControl(){
if (args.IsValid == false)
//set validation summary that is outside this web user control somehow???
}
</script>
client page of web user control
<html>
<head></head>
<body>
<uc1:DateTimePicker ID="dtDateNotified" runat="server" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List" />
</body>
</html>
Hi all, I have a web user control that contains a custom validation control that uses the client validation function. The web page that utilizes the web user control contains a validation summary control. Is there a way for the client validation function to access the validation summary control?
Just curious, is there any reason why you want to access the validation summary control from the validation function? If your goal is to make the summary control display error from the custom control, you don’t have to set from the client validation function. It happens automatically.
Otherwise, I am not sure it is a good idea to make the client validation function dependant on the summary control on the hosting page.
I apologize in advance if I misunderstood your question.