Response.Write(GridView1.DataKeys[e.RowIndex].ToSt

发布时间:2021-02-24 06:59:34

Response.Write(GridView1.DataKeys[e.RowIndex].ToString());抛出ArgumentOutOfRangeException异常求解

网友回答

比如你的DataKeys里面只保存了2个列的值,你e.RowIndex取到的是第几行.正确的作法应该是
GridView1.DataKeys[0].Values[e.RowIndex]类似这种
以上问题属网友观点,不代表本站立场,仅供参考!