title: alternating row color MVC
body: <p>I need to design a table with alternating row colors. Below is written code but its not working. May be some syntax issue for MVC. Please suggest.</p>
  
  <pre><code>@for (int i = 1; i &lt;= 10; i++)
  
  {
  
          var rowColor = "D9E6C4";
          &lt;tr style="background-color:@rowColor;" &gt;
              &lt;td&gt;apoorva&lt;/td&gt;
          &lt;/tr&gt;
          if (@rowColor.Equals("#ffffff"))
          {
              rowColor = "#D9E6C4";
          }
          else
          {
              rowColor = "#ffffff";
          }
  }
  </code></pre>