<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to: Alternate row color with the ASP.NET Repeater control</title>
	<atom:link href="http://blog.net-tutorials.com/2009/04/02/how-to-alternate-row-color-with-the-aspnet-repeater-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.net-tutorials.com/2009/04/02/how-to-alternate-row-color-with-the-aspnet-repeater-control/</link>
	<description>On everything .NET</description>
	<lastBuildDate>Thu, 23 Jun 2011 00:49:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Russell</title>
		<link>http://blog.net-tutorials.com/2009/04/02/how-to-alternate-row-color-with-the-aspnet-repeater-control/comment-page-1/#comment-13847</link>
		<dc:creator>Russell</dc:creator>
		<pubDate>Thu, 23 Jun 2011 00:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.net-tutorials.com/2009/03/17/alternate-row-color-with-the-aspnet-repeater-control/#comment-13847</guid>
		<description>Thank you for this post, I agree code is more maintainable when written once, and thus did not like the idea of using the  tag. 

I would suggest in most cases it is better not to have logic directly in the page. Inline code is generally harder to maintain.  For example, you could create a base class and have a generic property, eg:  which will return the correct alternate string.</description>
		<content:encoded><![CDATA[<p>Thank you for this post, I agree code is more maintainable when written once, and thus did not like the idea of using the  tag. </p>
<p>I would suggest in most cases it is better not to have logic directly in the page. Inline code is generally harder to maintain.  For example, you could create a base class and have a generic property, eg:  which will return the correct alternate string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Wittwer</title>
		<link>http://blog.net-tutorials.com/2009/04/02/how-to-alternate-row-color-with-the-aspnet-repeater-control/comment-page-1/#comment-11250</link>
		<dc:creator>Brandon Wittwer</dc:creator>
		<pubDate>Wed, 29 Dec 2010 18:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.net-tutorials.com/2009/03/17/alternate-row-color-with-the-aspnet-repeater-control/#comment-11250</guid>
		<description>wouldnt this be more efficient?

Dim altRow As Boolean = False
Private Function GetRowColor() As String
     Try
         Return If(altRow = False, &quot;#fff&quot;, &quot;#FCF3B2&quot;)
     Finally
         altRow = Not altRow
     End Try
End Function</description>
		<content:encoded><![CDATA[<p>wouldnt this be more efficient?</p>
<p>Dim altRow As Boolean = False<br />
Private Function GetRowColor() As String<br />
     Try<br />
         Return If(altRow = False, &#8220;#fff&#8221;, &#8220;#FCF3B2&#8243;)<br />
     Finally<br />
         altRow = Not altRow<br />
     End Try<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Norris</title>
		<link>http://blog.net-tutorials.com/2009/04/02/how-to-alternate-row-color-with-the-aspnet-repeater-control/comment-page-1/#comment-1067</link>
		<dc:creator>Jason Norris</dc:creator>
		<pubDate>Fri, 12 Jun 2009 09:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.net-tutorials.com/2009/03/17/alternate-row-color-with-the-aspnet-repeater-control/#comment-1067</guid>
		<description>Looks like it ate part of my comment because of angle braces, the important part is, instead of a call to the method in the code behind GetRowColor(), you can use:

Container.ItemType == ListItemType.AlternatingItem ? &quot;silver&quot; : &quot;#fff&quot;</description>
		<content:encoded><![CDATA[<p>Looks like it ate part of my comment because of angle braces, the important part is, instead of a call to the method in the code behind GetRowColor(), you can use:</p>
<p>Container.ItemType == ListItemType.AlternatingItem ? &#8220;silver&#8221; : &#8220;#fff&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Norris</title>
		<link>http://blog.net-tutorials.com/2009/04/02/how-to-alternate-row-color-with-the-aspnet-repeater-control/comment-page-1/#comment-1066</link>
		<dc:creator>Jason Norris</dc:creator>
		<pubDate>Fri, 12 Jun 2009 09:36:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.net-tutorials.com/2009/03/17/alternate-row-color-with-the-aspnet-repeater-control/#comment-1066</guid>
		<description>
        
                &lt;div style=&quot;background-color: ;&quot;&gt;
                        
                
        


Checking the Container.ItemType will save you needing a method in the code behind to do this.</description>
		<content:encoded><![CDATA[<p>&lt;div style=&#8221;background-color: ;&#8221;&gt;</p>
<p>Checking the Container.ItemType will save you needing a method in the code behind to do this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

