SelectedIndexChanged event doesn't fire
I have added the AutoPostBack = "true"
attribute to the drop down list.
It doesn't work.
<asp:DropDownList CssClass="dropDownList" ID="ddlBusinessUnit"
AutoPostBack="true" runat="server" Width="250px"
OnSelectedIndexChanged="ddlBusinessUnit_SelectedIndexChanged">
</asp:DropDownList>
code behind:
Protected Sub ddlBusinessUnit_Select开发者_开发知识库edIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Write("Hello")
End
How can I ensure that the event method is called?
Are you populating your Dropdownlist on every Postback?
Use IsPostBack to check whether the page is loaded for the first time or not.
If Not IsPostBack Then
BinDdlBusinessUnit()
End If
精彩评论