将每个DropDownList中嵌入该方发的调用,并且传入相应的id号来区分是哪个DropDownList传来的

解决方案 »

  1.   

      
    static private int i=0;
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            i=1;
            result1 = DropDownList1.SelectedValue; 
            GetInspectionItem(); 
            ClearFormControl(); 
        } 
        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            i=2;
            result2 = DropDownList2.SelectedValue; 
            GetInspectionItem(); 
            ClearFormControl(); 
        } 
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            i=3;
            result3 = DropDownList3.SelectedValue; 
            GetInspectionItem(); 
            ClearFormControl(); 
        } 
        private int getWhich_Select()
       {
          if(i==1).......
           if(i==2).......
           if(i==3).......
       }
    ...自己写了
      

  2.   

    我不是这个意思 ,我是让这三个DropDownList1_SelectedIndexChanged事件写在一个方法里,并且知道是选择哪一个DropDownList