实名认证用户熊川湘 身份证号码430811198506290914

填充24小时的时间

最早时间:
   <asp:DropDownList ID="StrTime" runat="server" style="margin-right:60px"/>
   最晚时间:
   <asp:DropDownList ID="EndTime" runat="server" />

StrTime.Items.Clear();
        EndTime.Items.Clear();
        string M = "0";
        for (int N = 0; N < 24; N++)
        {
            if (N > 9) { M = ""; }
            StrTime.Items.Add(new ListItem((M + N.ToString() + ":00").ToString(), (M + N.ToString() + ":00").ToString()));
            StrTime.Items.Add(new ListItem((M + N.ToString() + ":30").ToString(), (M + N.ToString() + ":30").ToString()));
            EndTime.Items.Add(new ListItem((M + N.ToString() + ":00").ToString(), (M + N.ToString() + ":00").ToString()));
            EndTime.Items.Add(new ListItem((M + N.ToString() + ":30").ToString(), (M + N.ToString() + ":30").ToString()));
        }
        StrTime.SelectedIndex = 28;
        EndTime.SelectedIndex = 36;

posted @ 2011-02-15 11:46  浪达短信群发  阅读(140)  评论(0编辑  收藏  举报