title: Apply Css Style while creating Dynamic Table
body: <p>Here is my problem:</p>
  
  <ul>
  <li><p>When I create my table in C#, I would like to add different CSS style to each cell.</p>
  
  <p>while (DR.Read())
          {</p>
  
  <pre><code>    TableRow linha1 = new TableRow();
      cel1 = new TableCell();
      cel2 = new TableCell();
      cel3 = new TableCell();
      cel4 = new TableCell();
  
      cel1.Controls.Add(new LiteralControl(DR.GetValue(0).ToString()));
      cel2.Controls.Add(new LiteralControl(DR.GetValue(1).ToString()));
      cel3.Controls.Add(new LiteralControl(DR.GetValue(2).ToString()));
      cel4.Controls.Add(new LiteralControl(DR.GetValue(3).ToString()));
  
  
      linha1.Controls.Add(cel1);
      linha1.Controls.Add(cel2);
      linha1.Controls.Add(cel3);
      linha1.Controls.Add(cel4);
      Tab_artigos_all.Controls.Add(linha1);
  }
  </code></pre></li>
  </ul>