0
火災SelectedIndexChanged事件我改變下拉列表與按鈕點擊這樣的:按鈕點擊下拉
ddl.selectedIndex+=1
我DDL如果有通過索引鍵來改變其在不觸發一個SelectedIndexChanged事件。這是一種正常的行爲嗎?我應該創建單獨的方法並在ddl.selectedIndex+=1
之後立即調用它,還是有更好的方法?
火災SelectedIndexChanged事件我改變下拉列表與按鈕點擊這樣的:按鈕點擊下拉
ddl.selectedIndex+=1
我DDL如果有通過索引鍵來改變其在不觸發一個SelectedIndexChanged事件。這是一種正常的行爲嗎?我應該創建單獨的方法並在ddl.selectedIndex+=1
之後立即調用它,還是有更好的方法?
我假設你使用ASP.NET?如果是這樣,設置AutoPostBack
可能會有所幫助:
<asp:DropDownList ID="ddl" runat="server" AutoPostBack="true">
</asp:DropDownList>
您可能想要指定您使用的下拉列表和技術的類型。你的意思是ASP ListControl? –