hi dharmendr
I see your suggested link but see my codes:
<script type="text/javascript">
function WebForm_OnSubmit() {
var message = document.getElementById("message");
message.style.display = "none";
if (typeof (ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) {
for (var i in Page_Validators) {
try {
if (!Page_Validators[i].isvalid) {
message.style.display = "block";
}
} catch (e) {
}
} return false;
} return true;
}
</script>
<div id="message" class="backS2fT1D">
please fill required field
</div>
here in page I define some textbox that users should fill them I use validation for all textbox like:
<asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtMName"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator4" runat="server" ControlToValidate="TxtMobile"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtaddC"></asp:RequiredFieldValidator>
so if users doesn't fill one of them below div will display for them:
<div id="message" class="backS2fT1D">
please fill required field
</div>
now I want define checkbox in this page and if users doesn't select one of checkboxs or doen't fill textboxs it will display above div
how I can do it?
best regards
neda