大体程序要求如下:
选择DropDownList    GridView  显示出相应的内容  ,单击Button  按钮 GridView执行对应的操作 ,但是现在出现这么一个问题, 我单击Button   GridView  自动就消失了...但是通过选DropDownList  GridView会出现 并且发现Button按钮所执行的操作执行了  经过测试发现单击GridView中自带的编辑按钮时也会出现GridView消失的情况..代码如下:
 ddlartCat01为DropDownList  ID
btnadd为button  ID protected void Page_Load(object sender, EventArgs e)
    {
        conn = new SqlConnection(strconn);
        if (!IsPostBack)
        {
            ddlartCat01.Items.Insert(0, new ListItem("请选择:", "0"));
         
        }
    }
 protected void btnadd_Click(object sender, EventArgs e)
    {
                 gvartCat01.ShowFooter = true;
    }
  protected void ddlartCat01_SelectedIndexChanged1(object sender, EventArgs e)
    {
      
        int idLang = Convert.ToInt32(ddlartCat01.SelectedIndex.ToString()) - 1;
        string artCat01Liststr = "select idCat01,qtyCat02,descData from vw_artCat01 where idLang='" + Convert.ToString(idLang) + "'";
        SqlDataSource2.SelectCommand = artCat01Liststr;
        conn.Open();
        SqlCommand artCat01cmd = new SqlCommand(artCat01Liststr, conn);
        artCat01da = new SqlDataAdapter(artCat01Liststr, conn);
        artCat01da.Fill(artCat01ds, "vw_artCat01");
        BindGrid();
        artCat01cmd.Dispose();
    }