how to make this better code and more optimized 
<p>so i am displaying first letter of the each Name starting from A and all the way to Z</p>

<p>some thing like this:</p>

<p>A <br>
Anthony <br>
Allan <br>
... <br></p>

<p>B <br>
Bob <br>
Builder <br>
.... <br></p>

<p>C <br>
Charyl <br>
Carl <br>
... <br>
 Z <br>
Zoah <br>
....<br></p>

<p>how can i make this code more optimized and use less line?</p>

<pre><code>int _a = 0;
int _b = 0;
int _c = 0;
...
...
..
int _z = 0;

protected void ListItem(List&lt;Customer&gt;.Enumerator cust)
{

if (cust.MoveNext())
 {
    Customer t = cust.Current;

string[] list = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "v", "z" };
var output = list.Aggregate("", (current, listitem) =&gt; current + (Environment.NewLine + "&lt;h1 id='" + listitem.ToUpper() + "'&gt;&lt;span&gt;" + listitem.ToUpper() + "&lt;/span&gt;&lt;/h1&gt;"));
string _name = t.Name.Substring(0, 1).ToUpper();


if (_name == list[0].ToUpper())
{
   if (_a == 0)
   {
      l = new Literal();
      l.Text = "&lt;h1 id='A'&gt;&lt;span&gt;A&lt;/span&gt;&lt;/h1&gt;" + Environment.NewLine;
      .....
      _a = 1;
  }
if (_name == list[1].ToUpper())
{
  if (_b == 0)
  {
    l = new Literal();
    l.Text = "&lt;h1 id='B'&gt;&lt;span&gt;A&lt;/span&gt;&lt;/h1&gt;" + Environment.NewLine;
    .....
    _b = 1;
  }
}
...
....
....
...

doing through Z

}
</code></pre>
