ASP.Net中的GridView更新错误 [英] GridView Updating Error in ASP.Net

查看:71
本文介绍了ASP.Net中的GridView更新错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我更新GridView时,出现错误消息

指定的参数超出有效值范围.
参数名称:索引


调试器中断时的代码是

While I Update GridView, I get the error as

Specified argument was out of the range of valid values.
Parameter name: index


The code when the debugger breaks is

bid = CType((gvBuilding.Rows(e.RowIndex).Cells(1).Controls(0)), TextBox).Text

推荐答案

使用调试器,检查e.RowIndex的值,是否超出范围?如果不是,那么Cells等.
Using debugger, check the value of e.RowIndex, is it out of bounds? If not what about Cells etc.


这篇关于ASP.Net中的GridView更新错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆