script type="text/javascript"
function CountryCheck(source, args)
{
var ddlCountry1 = document.getElementById ("dropweight");
var country = ddlCountry1.options[ddlCountry1.selectedIndex].value;
if (country == "0")
{
args.IsValid = false;
}
else
{
args.IsValid = true;
}
}
script
asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="Select Unit" Display="dynamic" ControlToValidate="dropweight" ClientValidationFunction="CountryCheck" ValidationGroup="addproduct"
No comments:
Post a Comment