protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {//更新
        string sqlstr = "update news set title='"
        + ((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim() + "'where id='" + GridView1.DataKeys[e.RowIndex].Value.ToString() + "'";
        SqlCommand sqlcom = new SqlCommand(sqlstr,conn);
        conn.Open();
        sqlcom.ExecuteNonQuery();
        conn.Close();
        GridView1.EditIndex = -1;
        bind(); 
 }