前台代码:<div>
  <table ID="Tb_adv_search" runat="server">
    <tr>
     <td><asp:DropDownList ID="Ddl_adv_search1" width="40" runat="server"></asp:DropDownList></td>
     <td><asp:DropDownList ID="Ddl_operator1" width="40" runat="server"></asp:DropDownList></td>
     <td colspan="2"><asp:TextBox ID="TxtB1" width="100" runat="server"></asp:TextBox></td>
   </tr>
  </table>
  <asp:Button ID="Btn_add_search" runat="server" Text="添加查询条件" OnClick="Btn_add_search_Click"/>
</div>
后台代码:public void Btn_add_search_Click(object sender, EventArgs e)
{  
 HtmlTableRow tr = new HtmlTableRow();
 HtmlTableCell td1 = new HtmlTableCell();
 HtmlTableCell td2 = new HtmlTableCell();
 HtmlTableCell td3 = new HtmlTableCell(); 
 HtmlTableCell td4 = new HtmlTableCell();
 DropDownList ddl1 = new DropDownList(); 
 DropDownList ddl2 = new DropDownList(); 
 TextBox Txb = new TextBox();
 Button Btn_del = new Button(); 
 Btn_del.Text = "删除";  
 td1.Controls.Add(ddl1);  
 td2.Controls.Add(ddl2);     
 td3.Controls.Add(Txb); 
 td4.Controls.Add(Btn_del);  
 tr.Cells.Add(td1);    
 tr.Cells.Add(td2);  
 tr.Cells.Add(td3);   
 tr.Cells.Add(td4);     
 Tb_adv_search.Rows.Add(tr);    
 Btn_del.Click += new EventHandler(Btn_del_Click);  
 } 
void Btn_del_Click(object sender, EventArgs e) 
{   
 this.Parent.Parent.Controls.Clear(); 
}
目的:点击页面上的“添加查询条件”按钮,table自动添加一行,此行有4列,前三列分别为DropDownList、DropDownList、TextBox,第四列为button,并且添加button_onclick事件,点击此按钮,删除当前行问题描述:我的代码只能添加一行,再点击时不再添加,点击删除按钮可以删除此行,但是在Btn_del_Click事件中设置断点,发现程序并没有进去,我知道这些设计viewstate,控件生命周期什么的,不太懂,方便的话顺便指导一下,谢谢!