问题描述
我有一个下拉列表,使用以下代码绑定后面代码中的数据:
DrpDiscussions.DataSource = dt;
DrpDiscussions.DataTextField = " Discussion_Name" ;
$
DrpDiscussions.DataValueField = " Discussion_Id" ;
- > DrpDiscussions.DataBind();
$
然而,当我尝试运行程序时,它显示"System.ArgumentOutOfRangeException:Selection out of range"错误。
任何想法?
-
谢谢
Debashis
Hi,
I have a dropdown which binds data from the code behind, using the following code:
DrpDiscussions.DataSource = dt;
DrpDiscussions.DataTextField = "Discussion_Name";
DrpDiscussions.DataValueField = "Discussion_Id";
--> DrpDiscussions.DataBind();
However when i try run the program it shows a "System.ArgumentOutOfRangeException: Selection out of range" error.
Any ideas?
--
Thanks
Debashis
这篇关于下拉列表 - System.ArgumentOutOfRange异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!