<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Required field validator for multiple checkbox</title><link>http://forums.asp.net/thread/3274744.aspx</link><pubDate>Sat, 04 Jul 2009 14:51:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274744</guid><dc:creator>deepthoughts</dc:creator><author>deepthoughts</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274744.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3274744</wfw:commentRss><description>&lt;p&gt;If it solved your problem then please mark it as answer.&lt;/p&gt;
&lt;p&gt;All the best&lt;/p&gt;</description></item><item><title>Re: Required field validator for multiple checkbox</title><link>http://forums.asp.net/thread/3274730.aspx</link><pubDate>Sat, 04 Jul 2009 14:33:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274730</guid><dc:creator>saurabh.15in</dc:creator><author>saurabh.15in</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274730.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3274730</wfw:commentRss><description>&lt;p&gt;Thanks a lot...It not only soved my problem but i got idea how to solve some other issues also....&lt;/p&gt;</description></item><item><title>Re: Required field validator for multiple checkbox</title><link>http://forums.asp.net/thread/3274169.aspx</link><pubDate>Sat, 04 Jul 2009 03:23:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274169</guid><dc:creator>deepthoughts</dc:creator><author>deepthoughts</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274169.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3274169</wfw:commentRss><description>&lt;p&gt;Although RequiredFieldValidators can be applied on RadioButtonLists and DropDownLists, you can&amp;#39;t apply them on CheckBox or CheckBoxLists. Because its valid to have a checkbox not checked at all.&lt;/p&gt;
&lt;p&gt;So in order to put this kind of logic, you&amp;#39;ll have to go for CustomValidators. Please note that we&amp;#39;ll keep the ControlToValidate property of the CustomValidator to empty. Because a validator can&amp;#39;t be applied on a CheckBoxList.&lt;/p&gt;
&lt;p&gt;Lets suppose we&amp;#39;ve a checkbox list of three checkboxes and we want to do postback only if any one of three is checked.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;    &amp;lt;asp:CheckBoxList ID=&amp;quot;chkList1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;asp:ListItem&amp;gt;Red&amp;lt;/asp:ListItem&amp;gt;
    &amp;lt;asp:ListItem&amp;gt;Green&amp;lt;/asp:ListItem&amp;gt;
    &amp;lt;asp:ListItem&amp;gt;Blue&amp;lt;/asp:ListItem&amp;gt;
    &amp;lt;/asp:CheckBoxList&amp;gt;
    &amp;lt;asp:CustomValidator ID=&amp;quot;CustomValidator1&amp;quot; runat=&amp;quot;server&amp;quot; ClientValidationFunction=&amp;quot;CheckBoxCheck&amp;quot; ErrorMessage=&amp;quot;Please check at least one&amp;quot; ValidationGroup=&amp;quot;VG&amp;quot;&amp;gt;&amp;lt;/asp:CustomValidator&amp;gt;
    &amp;lt;asp:Button ID=&amp;quot;btn1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Submit&amp;quot; ValidationGroup=&amp;quot;VG&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And the javascript method which does the validation is &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;        function CheckBoxCheck(sender, args) {
            if (document.getElementById(&amp;quot;chkList1_0&amp;quot;).checked || document.getElementById(&amp;quot;chkList1_1&amp;quot;).checked || document.getElementById(&amp;quot;chkList1_2&amp;quot;).checked) {
                args.IsValid = true;
                return;
            }
            args.IsValid = false;
        }&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please refer to following thread for more details&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forums.asp.net/t/1218279.aspx"&gt;http://forums.asp.net/t/1218279.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope it helps&lt;/p&gt;</description></item><item><title>Required field validator for multiple checkbox</title><link>http://forums.asp.net/thread/3273673.aspx</link><pubDate>Fri, 03 Jul 2009 14:27:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273673</guid><dc:creator>saurabh.15in</dc:creator><author>saurabh.15in</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273673.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3273673</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;
&lt;p&gt;How can i validate&amp;nbsp;multiple check box or checkboxlist&amp;nbsp;using required field validator .&lt;/p&gt;
&lt;p&gt;i want to check if any one check box is checked or not.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Saurabh&lt;/p&gt;</description></item></channel></rss>