在前台界面中点击DropDownList出来的SelectedIndexChanged事件不管用
部分代码如下
<tr>
                <td style="text-align:right;">生日:</td>
                <td>
                    <asp:DropDownList ID="DropDownList2" runat="server" 
                        onselectedindexchanged="DropDownList2_SelectedIndexChanged1">
                    </asp:DropDownList>
                    年
                    <asp:DropDownList ID="DropDownList3" runat="server" 
                        onselectedindexchanged="DropDownList3_SelectedIndexChanged1" 
                       >
                    </asp:DropDownList>
                    月
                    <asp:DropDownList ID="DropDownList4" runat="server" >
                    </asp:DropDownList>
                    日
                </td>
                <td></td>
            </tr>
//改变年份   
    protected void DropDownList2_SelectedIndexChanged1(object sender, EventArgs e)
    {
        int year = int.Parse(this.DropDownList2.SelectedItem.ToString());        if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
        {
            IsLoopYear = 0;
        }
    }    //改变月份
    protected void DropDownList3_SelectedIndexChanged1(object sender, EventArgs e)
    {
        int month = int.Parse(this.DropDownList3.SelectedItem.ToString());        if (month == 2)
        {
            dsMonth = 2;
        }
        else if (month == 4 || month == 6 || month == 9 || month == 11)
        {
            dsMonth = 1;
        }
        //如果是闰年
        if (IsLoopYear == 0 && dsMonth == 2)
        {
            this.DropDownList4.Items.Clear();
            for (int i = 1; i <= 29; i++)
            {
                this.DropDownList4.Items.Add(i.ToString());
            }
        }
        else if (dsMonth == 2)
        {
            this.DropDownList4.Items.Clear();
            for (int i = 1; i <= 28; i++)
            {
                this.DropDownList4.Items.Add(i.ToString());
            }
        }
        else if (dsMonth == 1)
        {
            this.DropDownList4.Items.Clear();
            for (int i = 1; i <= 30; i++)
            {
                this.DropDownList4.Items.Add(i.ToString());
            }
        }
        else
        {
            this.DropDownList4.Items.Clear();
            for (int i = 1; i <= 31; i++)
            {
                this.DropDownList4.Items.Add(i.ToString());
            }
        }
    }