ASP.NET SqlDataSource批量更新

ASP.NET SqlDataSource批量更新,asp.net,sqldatasource,bulk,Asp.net,Sqldatasource,Bulk,MSDN库提供了使用SqlDataSource进行批量更新的演练 不知道我做错了什么, 但我总是在以下方面出错: currentID=Convert.ToInt32GridDocuments.DataKeys0.Value 是否有其他资源用于SqlDataSource批量更新 示例中的行内容如下: currentID = Convert.ToInt32(GridView1.DataKeys[r.RowIndex].Value); 此行假设您正在网格上设置datakeys,请特别注意示例中的Da

MSDN库提供了使用SqlDataSource进行批量更新的演练

不知道我做错了什么, 但我总是在以下方面出错:

currentID=Convert.ToInt32GridDocuments.DataKeys0.Value


是否有其他资源用于SqlDataSource批量更新

示例中的行内容如下:

currentID = Convert.ToInt32(GridView1.DataKeys[r.RowIndex].Value);
此行假设您正在网格上设置datakeys,请特别注意示例中的DataKeyNames属性:DataKeyNames=EmployeeID

这个例子更容易理解。如果你想帮助调试另一个例子,请张贴你得到的错误