<?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>TheBeerHouse Starter Kit</title><link>http://forums.asp.net/1115.aspx</link><description>Discussions about TheBeerHouse Starter Kit for ASP.NET 2.0</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Creating Article Subcategories using ParentCategoryID</title><link>http://forums.asp.net/thread/3176604.aspx</link><pubDate>Wed, 20 May 2009 21:00:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3176604</guid><dc:creator>kabogo</dc:creator><author>kabogo</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3176604.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1115&amp;PostID=3176604</wfw:commentRss><description>&lt;p&gt;I need to implement multiple categories for articles. I followed the recommendation of adding a ParentCategoryID to the db using the int field type. I have changed the Category.cs, CategoryDetails.cs, and ArticlesProvider.cs files as needed and sucessfully built the solution. Upon running the site I receive the System.InvalidCastException detailed below;&lt;br /&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;Line 78:         &lt;span class="kwd"&gt;protected virtual&lt;/span&gt; CategoryDetails GetCategoryFromReader(IDataReader reader)
Line 79:         {
Line 80:             &lt;span class="kwd"&gt;return new&lt;/span&gt; CategoryDetails(                
Line 81:                (&lt;span class="kwd"&gt;int&lt;/span&gt;)reader[&lt;span class="st"&gt;&amp;quot;CategoryID&amp;quot;&lt;/span&gt;],
Line 82:                (&lt;span class="kwd"&gt;int&lt;/span&gt;)reader[&lt;span class="st"&gt;&amp;quot;ParentID&amp;quot;&lt;/span&gt;],
 
&lt;/pre&gt;
&lt;p&gt;I must be overlooking something. Any help would be greatly appreciated.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description></item></channel></rss>