4月 11, 2009

動態下拉式選單


If ddl_Stu1_Sex.SelectedValue = "女" Then
            ddl_Stu2_Sex.Items.Clear()
            ddl_Stu3_Sex.Items.Clear()
            ddl_Stu4_Sex.Items.Clear()
            ddl_Stu2_Sex.Items.Add("女")
            ddl_Stu3_Sex.Items.Add("女")
            ddl_Stu4_Sex.Items.Add("女")


        Else
            ddl_Stu2_Sex.Items.Clear()
            ddl_Stu3_Sex.Items.Clear()
            ddl_Stu4_Sex.Items.Clear()
            ddl_Stu2_Sex.Items.Add("男")
            ddl_Stu3_Sex.Items.Add("男")
            ddl_Stu4_Sex.Items.Add("男")
            ddl_Floor.Parent.DataBind()



        End If


沒有留言: