GridView去掉多余的废嘛

 


 GridView1中的属性EnableViewState="true"


  protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType==DataControlRowType.DataRow )
            {
                 e.Row.EnableViewState = false;
            }
          
        }

你可能感兴趣的:(GridView)