Normally Dropdown box is not fire event. to fire any event of dropdown box you need to write the AutoPostBack="True"
property in dropdown control.
ASPX File:
Codebehind:
ASPX File:
<asp:DropDownList ID="regionWingDropDownList" runat="server" Height="30px" Width="217px"
DataValueField="WingId" DataTextField="WingName" AutoPostBack="True"
style="margin-top: 0px"
onselectedindexchanged="regionWingDropDownList_SelectedIndexChanged"
>
</asp:DropDownList>
Codebehind:
protected void regionWingDropDownList_SelectedIndexChanged(object sender, EventArgs e)
{
Wing wing = new Wing();
wing.WingId = Convert.ToInt32(regionWingDropDownList.SelectedItem.Value);
regionDivisionDropDownList.DataSource = _regionManagerObj.GetSelectedWingAllDiviSionName(wing);
regionDivisionDropDownList.DataBind();
}
Comments
Post a Comment