-
here i am uploading company products, after that i am saving all products into databas.
i want give the RequiredFieldValidator to DataList, when DataList is empty.
and also display in ValidationSummary
// if (DataListCProductsImgs.Items.Count=0 )
// RequiredFieldValidator Fire ---"Upload one product"
i want to do in javascript or jquer ...
i tryed..
custom validator , But ControlToValidate= ?
function gettotalRows(sender, arguments)
{
var totalRowCount = $("[id*=DataListCompanyImgs] tr").length;
if(totalRowCount>0)
{
arguments.IsValue = true;
}
}
is there any another method.. to validate clientside.
Help me ..
Thanks