Server Error in '/' Application.
--------------------------------------------------------------------------------Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: indexSource Error:
Line 91: SqlCommand cm=new SqlCommand(mysql,cn);
Line 92: cm.Parameters.Add("@p_id",SqlDbType.Int);
Line 93: cm.Parameters["@p_id"].Value=dgd_prolist.DataKeys[(int)e.Item.ItemIndex];
Line 94: //string pidvalue= e.Item.Cells[0].Text.ToString();
Line 95: //cm.Parameters["@p_id"].Value=Int32.Parse(pidvalue);
Source File: c:\inetpub\wwwroot\qproducts\pmanage.aspx.cs Line: 93
--------------------------------------------------------------------------------Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: indexSource Error:
Line 91: SqlCommand cm=new SqlCommand(mysql,cn);
Line 92: cm.Parameters.Add("@p_id",SqlDbType.Int);
Line 93: cm.Parameters["@p_id"].Value=dgd_prolist.DataKeys[(int)e.Item.ItemIndex];
Line 94: //string pidvalue= e.Item.Cells[0].Text.ToString();
Line 95: //cm.Parameters["@p_id"].Value=Int32.Parse(pidvalue);
Source File: c:\inetpub\wwwroot\qproducts\pmanage.aspx.cs Line: 93
解决方案 »
- 新手:刚刚接触asp.net,怎样更快提高?
- 问一个代码的问题!!!!
- 删除系统扩展存储过程
- ★asp.net技术新手群7437027★
- 问一个以前问过的问题
- 100分! 求一个调用客户端脚本的方法
- asp.net中类与对象的使用问题。
- 求一段用htmlInputFile控件上传文件的代码.调试成功就给分!
- 在datagrid里怎么用acronym 马上加分
- 在ASP.NET中对SQL SERVER进行ReStore操作错误!!!
- 我想在在Datagrid上面移动鼠标时,能看到自定义的提示。不知如何实现。象进入163邮箱时的前面提示,很漂亮的。
- 紧急请教如何实现完全可编辑、类似Excel功能的DataGrid?
作者:孟宪会 出自:【孟宪会之精彩世界】 发布日期:2003年5月11日 11点35分53秒 C#版本 例子http://dotnet.aspx.cc/Exam/DataGridPaging/DataGridPaging.aspx