不太完整的dropdownlist三级联动查询

protected void ddlCollege_SelectedIndexChanged(object sender, EventArgs e)
    {
        ViewState["m_collegeNum"] = ddl_College.SelectedItem.Value.ToString();
        ViewState["m_departmentNum"] = "-1";
        ViewState["m_majorNum"] = "-1";
        ddlDepartment_DataBind();
        ddlMajor_DataBind();
    }
    protected void ddlDepartment_SelectedIndexChanged(object sender, EventArgs e)
    {
        ViewState["m_departmentNum"] = ddl_Department.SelectedItem.Value.ToString();
        ViewState["m_majorNum"] = "-1";
        //ddlCollege_DataBind();
        ddlMajor_DataBind();
    }
    protected void ddlMajor_SelectedIndexChanged(object sender, EventArgs e)
    {
        ViewState["m_majorNum"] = ddl_Major.SelectedItem.Value.ToString();
        //ddlCollege_DataBind();
        //ddlDepartment_DataBind();
    }

你可能感兴趣的:(不太完整的dropdownlist三级联动查询)