
-
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= ?
JavaScript
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
Delpin Susai RajRank #53 · 29.5K pointsPosted Sep 21, 2016, 3:52 AM EDT