Gridview中二级联动

代码
 protected void drpZuoyedian_SelectedIndexChanged(object sender, EventArgs e)
 {
        DropDownList drpZuoyedian 
= (DropDownList)sender;
        GridViewRow gvData 
= (GridViewRow)drpZuoyedian.NamingContainer;

        
string zuoyedian = drpZuoyedian.SelectedValue;
        DropDownList drpXianbie 
= (DropDownList)gvData.FindControl("drpXianbie");
        
string sqlxianbie = "select * from pubXianbie where parent_id='" + zuoyedian + "'";
        Util.BindDropDownList(drpXianbie, sqlxianbie, 
"name""id");
 }
原文地址:https://www.cnblogs.com/ycsfwhh/p/1828187.html