我有2个下拉列表,我需要第一个(ActionList)来控制第二个(JustificationList)的值。问题是,当我在第一个下拉列表中包含AUtopostabck时,我的整个页面都刷新了。
我尝试使用updatePanel和触发器,但仍然无法正常工作。没有错误,只是刷新发生在“索引已更改”上。
<ContentTemplate>
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<input class="form-control" id="myInput" type="text" placeholder="Search.." autocomplete="off" style="width: 80%; margin-left: 25px; margin-bottom: 10px;">
<asp:Label Text="Update Selection" runat="server" Style="width: 80%; margin-left: 25px; margin-bottom: 10px; color: white"></asp:Label>
<asp:DropDownList ID="ActionList" runat="server" AutoPostBack="true" CSSclass="form-control" style="width: 80%; margin-left: 25px; margin-bottom: 10px;" OnSelectedIndexChanged="JustificationData" ></asp:DropDownList>
<asp:DropDownList ID="JustificationList" runat="server" CSSclass="form-control" style="width: 80%; margin-left: 25px; margin-bottom: 10px;" ></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ActionList" />
</Triggers>
</asp:UpdatePanel>
我在做什么错了?
需要查看OnselectedIndexchanged的后端代码。