문제

i change dropdown list with button click like this:

ddl.selectedIndex+=1

my ddl has a SelectedIndexChanged event which is not firing if index changed through button. Is it a normal behavior? Should I create separate method and call it right after the ddl.selectedIndex+=1 or there's a better way?

도움이 되었습니까?

해결책

I'm assuming you're using ASP.NET? If so, setting AutoPostBack may help:

<asp:DropDownList ID="ddl" runat="server" AutoPostBack="true">
</asp:DropDownList>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top