populating dropdownlist with hours in c#
<p>I have to 2 dropdownlists and I want to populate them with hours from 1 to 24. Then I want to make the difference between them.If i choose in the first dropdown let's say the hour 12 AND in the second 16 then the difference will be 4. How can I achieve that in c#? I'm developing a asp.net web application with c#.This is how I populate my dropdownlist:</p>

<pre><code> DateTime Date = DateTime.Today;
 DateTime Time = DateTime.Now;
 ListItem item1 = new ListItem(Time.ToShortTimeString(),
                               Time.ToShortTimeString());

 for (int i = 0; i &lt;= 48; i++)
 {
   ListItem item2 = new ListItem(Date.ToShortTimeString(), 
                                 Date.ToShortTimeString());

   droplist.Items.Add(item2);


   if (Date.CompareTo(Time) &lt; 0 &amp;&amp; Date.AddMinutes(30).CompareTo(Time) &gt; 0)
     droplist.Items.Add(item1);

   Date = Date.AddMinutes(60);
 }
</code></pre>

<p>How can I assign values to my dropdown, values being the hours??</p>
