Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Validating DataList. when datalist count is zero
aadi kumary
Sep 21 2016 5:23 AM
278
Reply
-
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
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
The resource cannot be found.
How to create dynamic website?