<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Swedish fika &#187; ASP.NET</title>
	<atom:link href="http://www.swedishfika.com/category/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.swedishfika.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 25 Jul 2010 21:57:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Achieve AlternatingRowStyle BackColor with a repeater</title>
		<link>http://www.swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/</link>
		<comments>http://www.swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 15:30:10 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/</guid>
		<description><![CDATA[If you want an alternating background color on a row in a gridview it&#8217;s just to add the AternatingRowStyle-BackColor-attribute. It&#8217;s not the same thing with a repeater but this is how you do it.
If you want the repeater to have an alternating background color on the rows in a table it&#8217;s just to add an [...]]]></description>
			<content:encoded><![CDATA[<p>If you want an alternating background color on a row in a gridview it&#8217;s just to add the AternatingRowStyle-BackColor-attribute. It&#8217;s not the same thing with a repeater but this is how you do it.</p>
<p><span id="more-33"></span>If you want the repeater to have an alternating background color on the rows in a table it&#8217;s just to add an alternating template and add a css-class to the &lt;tr&gt; that&#8217;s in the alternating template.</p>
<p><code>&lt;table id="tableListOfUsers" class="list-of-users"&gt;<br />
  &lt;tr&gt;<br />
    &lt;th&gt;Name&lt;/th&gt;<br />
  &lt;/tr&gt;<br />
  &lt;asp:Repeater ID="RepeaterListOfUsers" runat="server"&gt;<br />
    &lt;ItemTemplate&gt;<br />
      &lt;tr&gt;<br />
        &lt;td&gt;&lt;%# Eval("Name") %&gt;&lt;/td&gt;<br />
      &lt;/tr&gt;<br />
    &lt;/ItemTemplate&gt;<br />
    &lt;AlternatingItemTemplate&gt;<br />
      &lt;tr class="alternating"&gt;<br />
        &lt;td&gt;&lt;%# Eval("Name") %&gt;&lt;/td&gt;<br />
      &lt;/tr&gt;<br />
    &lt;/AlternatingItemTemplate&gt;<br />
  &lt;/asp:Repeater&gt;<br />
&lt;/table&gt;</code></p>
<p><em>/Simon Kjellberg </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
