前台
<form id="form1" runat="server" >
    <div>
        &nbsp; &nbsp;&nbsp; &nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" OnRowCancelingEdit="GridView1_RowCancelingEdit" Font-Size="10pt">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td style="width: 100px">
                                    姓名</td>
                                <td style="width: 100px">
                                    一级主管评分</td>
                                <td style="width: 100px">
                                    二级主管评分</td>
                                <td style="width: 100px">
                                    三级主管评分</td>
                                <td style="width: 100px">
                                    综合评分</td>
                                <td style="width: 100px">
                                    编辑</td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td style="width: 100px; height: 21px">
                                <%# DataBinder.Eval (Container.DataItem,"xm") %></td>
                                <td style="width: 100px; height: 21px">
                                <%# DataBinder.Eval (Container.DataItem,"xs1") %></td>
                                <td style="width: 100px; height: 21px">
                                <%# DataBinder.Eval (Container.DataItem,"xs2") %></td>
                                <td style="width: 100px; height: 21px">
                                <%# DataBinder.Eval (Container.DataItem,"xs3") %></td>
                                <td style="width: 100px; height: 21px">
                                <%# DataBinder.Eval (Container.DataItem,"xs") %></td>
                                <td style="width: 100px; height: 21px">
                                <asp:LinkButton ID="edit" runat="server" CommandName="edit" Text="编辑"></asp:LinkButton></td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td style="width: 100px">
                                <%# DataBinder.Eval (Container.DataItem,"xm") %></td>
                                <td style="width: 100px">
                                <asp:TextBox ID="xs1" width="70" Text='<%# DataBinder.Eval (Container.DataItem,"xs1") %>' runat="server" ></asp:TextBox></td>
                                <td style="width: 100px">
                                <asp:TextBox ID="xs2" width="70" Text='<%# DataBinder.Eval (Container.DataItem,"xs2") %>' runat="server" ></asp:TextBox></td>
                                <td style="width: 100px">
                                <asp:TextBox ID="xs3" width="70" Text='<%# DataBinder.Eval (Container.DataItem,"xs3") %>' runat="server" ></asp:TextBox></td>
                                <td style="width: 100px">
                                <%# DataBinder.Eval (Container.DataItem,"xs") %></td>
                                <td style="width: 120px">
                                <asp:LinkButton ID="update" runat="server" CommandName="update" Text="确认"></asp:LinkButton><asp:LinkButton ID="cancel" runat="server" CommandName="cancel" Text="取消"></asp:LinkButton></td>
                            </tr>
                        </table>
                    </EditItemTemplate>
                    
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    
    </div>
    </form>
后台
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls; public partial class xs : System.Web.UI.Page
{
    //加载
    protected void Page_Load(object sender, EventArgs e)
    {
        bind();
    }
    //绑定
    public void bind()
    {
        SqlConnection sqlcon = new SqlConnection("server=192.168.0.231;database=iOffice;uid=sa;pwd=future?20061101");
        string sqlstr = "select a.id,b.name as xm,a.xs,a.xs1,a.xs2,a.xs3 from mrArchive c inner join stras a on c.EmpID=a.EmpID inner join mrBaseInf b on a.EmpID=b.EmpID where c.FDepID1=21";
        SqlDataAdapter myda = new SqlDataAdapter(sqlstr, sqlcon);
        DataSet myds = new DataSet();
        sqlcon.Open();
        myda.Fill(myds, "stras");
        GridView1.DataSource = myds;
        GridView1.DataKeyNames = new string[] { "ID" };//主键 
        GridView1.DataBind();
        sqlcon.Close();
    }
    //编辑
    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        this.GridView1.EditIndex = e.NewEditIndex;
        bind();
    }
    //取消
     protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
    {
        this.GridView1.EditIndex = -1;
        bind();
    }
    //更新
    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        SqlConnection sqlcon = new SqlConnection("server=192.168.0.231;database=iOffice;uid=sa;pwd=future?20061101");
        string st = ((TextBox)this.GridView1.Rows[e.RowIndex].FindControl("xs1")).Text.ToString();
        string sqlstr = "update stras set xs1='" + ((TextBox)this.GridView1.Rows[e.RowIndex].FindControl("xs1")).Text.ToString() + "',xs2='"
        + ((TextBox)this.GridView1.Rows[e.RowIndex].FindControl("xs2")).Text.ToString() + "',xs3='"
        + ((TextBox)this.GridView1.Rows[e.RowIndex].FindControl("xs3")).Text.ToString() + "' where id='"
        + GridView1.DataKeys[e.RowIndex].Value.ToString() + "'";
        Response.Write(st);
        SqlCommand sqlcom = new SqlCommand(sqlstr, sqlcon);
        sqlcon.Open();
        sqlcom.ExecuteNonQuery();
        sqlcon.Close();
        GridView1.EditIndex = -1;
        bind();
    }   
}
为什么编辑之后,点更新按钮时。((TextBox)this.GridView1.Rows[e.RowIndex].FindControl("xs1")).Text.ToString()取到的是绑定值,而不是在编辑时所修改值,即编辑之前的值。