我有自定义验证器代码
<asp:CustomValidator ID="ddl1" ClientValidationFunction="IscontrolVisible" ControlToValidate="ddl1"
runat="server" ValidationGroup="ValSummary" Display="Dynamic" ErrorMessage="drop down invisible">*</asp:CustomValidator>
下面是功能
function IscontrolVisible(source, arguments) {
//if ((document.getElementById(source).visibility == "visible")) {
debugger;
if (arguments.value == "" || arguments.value == "Select...") {
arguments.IsValid = false;
}
else {
arguments.IsValid = true;
}
}
如何根据控件的可见性获取错误消息?