下拉列表和SelectedIndexChanged [英] Dropdownlists and SelectedIndexChanged
本文介绍了下拉列表和SelectedIndexChanged的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下拉列表和SelectedIndexChanged中激活oldposts()时遇到一点麻烦。
这是我的代码:
< asp:DropDownList ID = DropDownList1 runat = server AutoPostBack = True OnSelectedIndexChanged = DropDownList1_SelectedIndexChanged > ;
受保护的 Sub DropDownList1_SelectedIndexChanged(< span class =code-keyword> ByVal sender 作为 对象, ByVal e As System.EventArgs)句柄 DropDownList1.SelectedIndexChanged
oldposts()
结束 Sub
错误代码:
最小下拉:指数超出界限 解决方案
当你的索引大于最高值时会发生这种情况数组的索引,在本例中是下拉列表的值数组。检查你的oldposts()是否有类似于描述的东西。
这个 [ ^ ]可能有所帮助。
Having a little trouble with dropdownlists and SelectedIndexChanged in activating oldposts().
Here is my code:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
oldposts()
End Sub
Error Code:
Min Dropdown: Index was outside the bounds of the array.
解决方案 This happens when your index is greater than the highest index of an array, in this case, the value array of the dropdownlist. Check your oldposts() if there is something similar to what was described.
This[^] may help.
这篇关于下拉列表和SelectedIndexChanged的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文