<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx</link><description>The early previews of the MVC Toolkit contained a few helpers that are not available in the current MVC Beta and MVC Beta Futures .&amp;#160; On of the ones that was nixed was the CheckBoxList helper.&amp;#160; I was in need of this type of functionality lately</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>CheckBoxList Helper for MVC | Tmao Coders</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9059112</link><pubDate>Tue, 11 Nov 2008 05:22:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9059112</guid><dc:creator>CheckBoxList Helper for MVC | Tmao Coders</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.tmao.info/checkboxlist-helper-for-mvc/"&gt;http://www.tmao.info/checkboxlist-helper-for-mvc/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Extending MVC: Returning an Image from a Controller Action</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9068388</link><pubDate>Fri, 14 Nov 2008 06:54:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9068388</guid><dc:creator>Jeremiah Clark's Blog</dc:creator><description>&lt;p&gt;So I was thinking tonight, what if I want my MVC application to serve images that are stored in a SQL&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9435960</link><pubDate>Fri, 20 Feb 2009 16:13:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9435960</guid><dc:creator>James</dc:creator><description>&lt;p&gt;Just what I was looking for - thanks!&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9624626</link><pubDate>Mon, 18 May 2009 03:24:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9624626</guid><dc:creator>Peter Duerden</dc:creator><description>&lt;p&gt;Not being a strong C# coder I was grateful to find a re-implementation of the Html.CheckBoxList helper that was dropped in MVC Preview 5. I'm beginning to realise how much better my C# is going to have to get to be able to get the best out of ASP.NET MVC. However, after more than 10 years my raw HTML is pretty good ;) and in return for you generously sharing your code though I should point out that the HTML generated is invalid.&lt;/p&gt;
&lt;p&gt;It's probably the use of TagRenderMode.Normal but INPUT elements are defined as EMPTY and closing tags are FORBIDDEN. Check the W3C specs at &lt;a rel="nofollow" target="_new" href="http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT"&gt;http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT&lt;/a&gt;. Also, it's best to associate the text as a LABEL element with the INPUT for accessibility and semantics. For example (hope the HTML makes it via this comment):&lt;/p&gt;
&lt;p&gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;red&amp;quot; value=&amp;quot;red&amp;quot; name=&amp;quot;colour&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;label for=&amp;quot;red&amp;quot;&amp;gt;Red&amp;lt;/label&amp;gt;&lt;/p&gt;
&lt;p&gt;To achieve this I modified the TagBuilder section as follows:&lt;/p&gt;
&lt;p&gt;TagBuilder inputBuilder = new TagBuilder(&amp;quot;input&amp;quot;);&lt;/p&gt;
&lt;p&gt;if (info.IsChecked) inputBuilder.MergeAttribute(&amp;quot;checked&amp;quot;, &amp;quot;checked&amp;quot;);&lt;/p&gt;
&lt;p&gt;inputBuilder.MergeAttributes&amp;lt;string, object&amp;gt;(htmlAttributes);&lt;/p&gt;
&lt;p&gt;inputBuilder.MergeAttribute(&amp;quot;type&amp;quot;, &amp;quot;checkbox&amp;quot;);&lt;/p&gt;
&lt;p&gt;inputBuilder.MergeAttribute(&amp;quot;value&amp;quot;, info.Value);&lt;/p&gt;
&lt;p&gt;inputBuilder.MergeAttribute(&amp;quot;name&amp;quot;, name);&lt;/p&gt;
&lt;p&gt;inputBuilder.GenerateId(info.Value);&lt;/p&gt;
&lt;p&gt;TagBuilder labelBuilder = new TagBuilder(&amp;quot;label&amp;quot;);&lt;/p&gt;
&lt;p&gt;labelBuilder.MergeAttribute(&amp;quot;for&amp;quot;, inputBuilder.Attributes[&amp;quot;id&amp;quot;]);&lt;/p&gt;
&lt;p&gt;labelBuilder.InnerHtml = info.DisplayText;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.Append(inputBuilder.ToString(TagRenderMode.SelfClosing));&lt;/p&gt;
&lt;p&gt;sb.Append(labelBuilder.ToString(TagRenderMode.Normal));&lt;/p&gt;
&lt;p&gt;sb.Append(&amp;quot;&amp;lt;br /&amp;gt;&amp;quot;);&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9683968</link><pubDate>Tue, 02 Jun 2009 09:58:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9683968</guid><dc:creator>John Kaster</dc:creator><description>&lt;p&gt;Thanks for your code contribution. Is there a specific reason you created CheckBoxListInfo instead of reusing the existing SelectListItem class?&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9684099</link><pubDate>Tue, 02 Jun 2009 10:13:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9684099</guid><dc:creator>John Kaster</dc:creator><description>&lt;p&gt;Also, you said: &amp;quot;The problem with using Html.CheckBox for my scenario arises when you need to get the values in the form ActionMethod. &amp;nbsp;For Html.CheckBox, the form handler is expecting a boolean parameter for each checkbox. &amp;nbsp;An example is show below.&amp;quot;&lt;/p&gt;
&lt;p&gt;I think you could use FormCollection formValues for this scenario.&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9801974</link><pubDate>Wed, 24 Jun 2009 22:54:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9801974</guid><dc:creator>Andre Nascentes</dc:creator><description>&lt;p&gt;Hi Jeremiah! &lt;/p&gt;
&lt;p&gt;I'm using this helper with the final version of ASP.NET MVC.&lt;/p&gt;
&lt;p&gt;The problem is the save method... &amp;nbsp;When I receive a FormCollection, it brings all the checkboxes values.. but only the value.. and I don't know if it's checked or not.&lt;/p&gt;
&lt;p&gt;When I receive a string [] it brings me nothing... &lt;/p&gt;
&lt;p&gt;Do you know how I can do the save method? &lt;/p&gt;
&lt;p&gt;Thanks! &lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9811488</link><pubDate>Wed, 01 Jul 2009 20:23:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9811488</guid><dc:creator>Tim Rourke</dc:creator><description>&lt;p&gt;@Andre Nascentes:&lt;/p&gt;
&lt;p&gt;You might try this:&lt;/p&gt;
&lt;p&gt;bool bChecked = form[key].Contains(&amp;quot;true&amp;quot;);&lt;/p&gt;
&lt;p&gt;I found it on StackOverflow at &lt;a rel="nofollow" target="_new" href="http://stackoverflow.com/questions/220020/how-to-handle-checkboxes-in-asp-net-mvc-forms/220073"&gt;http://stackoverflow.com/questions/220020/how-to-handle-checkboxes-in-asp-net-mvc-forms/220073&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9817868</link><pubDate>Sun, 05 Jul 2009 07:16:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9817868</guid><dc:creator>Gerardo Contijoch</dc:creator><description>&lt;p&gt;Nice implementation, but unfortunately, it doesn't have support for ModelState.&lt;/p&gt;
&lt;p&gt;I made a similar custom implementation of CheckListBox based on the CheckBox() extension method from ASP.NET MVC.&lt;/p&gt;
&lt;p&gt;If you are interested in it you may find it here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://gerardocontijoch.wordpress.com/2009/07/04/un-checkboxlist-que-funciona-en-asp-net-mvc/"&gt;http://gerardocontijoch.wordpress.com/2009/07/04/un-checkboxlist-que-funciona-en-asp-net-mvc/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The post is in spanish, but I guess nobody will have problem reading the code.&lt;/p&gt;
&lt;p&gt;The only limitation I find in my implementation is that the checkstate of the checkboxes can only be loaded from the ModelState and you can't set it by hand.&lt;/p&gt;
&lt;p&gt;Great blog, btw!&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9817869</link><pubDate>Sun, 05 Jul 2009 07:18:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9817869</guid><dc:creator>Gerardo Contijoch</dc:creator><description>&lt;p&gt;I forgot to mention that my implementation have support for ModelState, that's why I mentioned it :P&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9826769</link><pubDate>Thu, 09 Jul 2009 17:04:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9826769</guid><dc:creator>vp</dc:creator><description>&lt;p&gt;I have used your code. but I am getting the below error &amp;nbsp;&amp;quot;best extension method overload -------&amp;quot; has some invalid arguments... &lt;/p&gt;
&lt;p&gt;i have used below code &lt;/p&gt;
&lt;p&gt;&amp;lt;div&amp;gt;&amp;lt;%=Html.CheckBoxList(&amp;quot;test&amp;quot;,ViewData.Model)%&amp;gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;ViewData.Model - here i have passed lsit..&lt;/p&gt;
&lt;p&gt;still am getting invalid argumets error&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9892242</link><pubDate>Mon, 07 Sep 2009 17:37:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9892242</guid><dc:creator>Lauri Larjo</dc:creator><description>&lt;p&gt;Nice example, works fine. Unfortunately this doesn't support ModelState and thus validation will be a bit harder.&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9915782</link><pubDate>Sun, 01 Nov 2009 03:08:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9915782</guid><dc:creator>jmuir</dc:creator><description>&lt;p&gt;Great solution for creating a checkboxlist. You just saved me numerous hours of work. Thank you!&lt;/p&gt;
</description></item><item><title>re: CheckBoxList Helper for MVC</title><link>http://blogs.msdn.com/miah/archive/2008/11/10/checkboxlist-helper-for-mvc.aspx#9923651</link><pubDate>Tue, 17 Nov 2009 16:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923651</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Thanks for sharing this. I need my list broken into table columns so I extended this a little further and thought I would share it. &lt;/p&gt;
&lt;p&gt;Passing in a new variable I call 'split' that represents the number of columns I want in the table. Code then evenly splits them into table columns which look nice :)&lt;/p&gt;
&lt;p&gt;Passing &amp;lt;= 1 or not passing a number makes it work as normal:&lt;/p&gt;
&lt;p&gt;Here is the code:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public static string CheckBoxList(this HtmlHelper htmlHelper, string name, List&amp;lt;CheckBoxListInfo&amp;gt; listInfo)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return htmlHelper.CheckBoxList(name, listInfo, 0,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((IDictionary&amp;lt;string, object&amp;gt;)null));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static string CheckBoxList(this HtmlHelper htmlHelper, string name, List&amp;lt;CheckBoxListInfo&amp;gt; listInfo, int split)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return htmlHelper.CheckBoxList(name, listInfo, split,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((IDictionary&amp;lt;string, object&amp;gt;)null));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static string CheckBoxList(this HtmlHelper htmlHelper, string name, List&amp;lt;CheckBoxListInfo&amp;gt; listInfo,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object htmlAttributes)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return htmlHelper.CheckBoxList(name, listInfo, 0,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((IDictionary&amp;lt;string, object&amp;gt;)new RouteValueDictionary(htmlAttributes)));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static string CheckBoxList(this HtmlHelper htmlHelper, string name, List&amp;lt;CheckBoxListInfo&amp;gt; listInfo, int split,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IDictionary&amp;lt;string, object&amp;gt; htmlAttributes)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (String.IsNullOrEmpty(name))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new ArgumentException(&amp;quot;The argument must have a value&amp;quot;, &amp;quot;name&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (listInfo == null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new ArgumentNullException(&amp;quot;listInfo&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (listInfo.Count &amp;lt; 1)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new ArgumentException(&amp;quot;The list must contain at least one value&amp;quot;, &amp;quot;listInfo&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StringBuilder sb = new StringBuilder();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int colCount = 0;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int count = 0;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int maxItems = listInfo.Count();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (split &amp;gt; 1)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Begin Table&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.AppendLine(&amp;quot;&amp;lt;table width='100%' border='0'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;foreach (CheckBoxListInfo info in listInfo)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TagBuilder builder = new TagBuilder(&amp;quot;input&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (info.IsChecked) builder.MergeAttribute(&amp;quot;checked&amp;quot;, &amp;quot;checked&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;builder.MergeAttributes&amp;lt;string, object&amp;gt;(htmlAttributes);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;builder.MergeAttribute(&amp;quot;type&amp;quot;, &amp;quot;checkbox&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;builder.MergeAttribute(&amp;quot;value&amp;quot;, info.Value);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;builder.MergeAttribute(&amp;quot;name&amp;quot;, name);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;builder.InnerHtml = info.DisplayText;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.Append(builder.ToString(TagRenderMode.Normal));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (split &amp;lt;= 1)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Skip Table all together....&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;count ++;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;colCount ++;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (split == colCount)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;colCount = 0;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.Append(&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (count != maxItems)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Need another row&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.Append(&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.Append(&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (split &amp;gt; 1)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sb.Append(&amp;quot;&amp;lt;/table&amp;gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return sb.ToString();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
</description></item></channel></rss>