C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




checkboxlist server control script validation


Posted Date: 30 Jul 2008      Total Responses: 2

Posted By: S.Nageswararao       Member Level: Bronze     Points: 1


i want the validation for the checkboxlist if more than 3 are selected then error message should be generated



Responses

Author: Parashu(Swathimutyam)    30 Jul 2008Member Level: GoldRating:     Points: 4
var chklist=document.getElementById("ChkboxID");
var count=0;
for(var i=0; i<savedQuerylist.length; i++)
{
if(chklist.options(i).selected == true)
{
count++;
}
}
if(count>3)
{
alert('your message');



Regards,
Parshu(swathimutyam)
}



Author: Mexi Renjith Mamman    30 Jul 2008Member Level: GoldRating:     Points: 3

You can try this :

int count = 0;

for(int i=0; i < chkLst1.Items.Count; i++)
{
if (chkLst1.Checked)
{
count++;
}
if (count >3)
{
// Alert message
}
}


Post Reply
You must Sign In to post a response.
Next : Package load failure problem
Previous : plz solve very urgentttttttttttttttttt?
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

internet fax

Contact Us    Privacy Policy    Terms Of Use