title: Display list of events grouped by day of the week
body: <p>I am trying to display a list of events per day based on data entries in a sql server database. I want it to display on the page like this:</p>
  
  <pre><code>Monday - Title1 Title2
  Tuesday - Title3
  Wednesday - Title4 Title5
  </code></pre>
  
  <p>Right now my data looks like this</p>
  
  <pre><code>Title  | StartDate
  Title1 | 2015-04-20 16:46:00.00
  Title2 | 2015-04-20 12:46:00.00
  Title3 | 2015-04-21 16:46:00.00
  Title4 | 2015-04-22 1:46:00.00
  Title5 | 2015-04-22 13:12:00.00
  </code></pre>
  
  <p>I only need the next 7 days. I'm very new to this and this is what I attempted to do but this does not work how I want it to at all.</p>
  
  <pre><code>StringBuilder el = new StringBuilder();
  using (SqlConnection conn = new SqlConnection(""))
  {
              SqlCommand cmd = new SqlCommand(@"select * from Event where
                                              convert(datetime, StartDate , 101) &gt;= DATEADD(d,DATEDIFF(d,0,getdate()),0) 
                                              order by StartDate", conn);
              conn.Open();
              SqlDataReader rdr = cmd.ExecuteReader();
              while (rdr.Read())
              {
                  DateTime start = DateTime.Now;
                  DateTime end = DateTime.Now.AddDays(7);
                  int days = (end - start).Days;
                  Enumerable
                      .Range(0, days)
                      .Select(x =&gt; start.AddDays(x))
                      .ToList()
                      .ForEach(d =&gt;
                      {
                          DayOfWeek dayOfWeek = d.DayOfWeek;
                          el.Append("&lt;strong&gt;" + Convert.ToDateTime(rdr["StartDate"].ToString()).DayOfWeek + "&lt;/strong&gt;&lt;br /&gt;");
                          el.Append(rdr["Title"].ToString() + "&lt;br /&gt;");
                      });
              }
              rdr.Close();
  }
  Label1.Text = el.ToString();
  </code></pre>