2011-08-31 115 views
0

火灾SelectedIndexChanged事件我改变下拉列表与按钮点击这样的:按钮点击下拉

ddl.selectedIndex+=1 

我DDL如果有通过索引键来改变其在不触发一个SelectedIndexChanged事件。这是一种正常的行为吗?我应该创建单独的方法并在ddl.selectedIndex+=1之后立即调用它,还是有更好的方法?

+0

您可能想要指定您使用的下拉列表和技术的类型。你的意思是ASP ListControl? –

回答

1

我假设你使用ASP.NET?如果是这样,设置AutoPostBack可能会有所帮助:

<asp:DropDownList ID="ddl" runat="server" AutoPostBack="true"> 
</asp:DropDownList> 
相关问题