C# asp.net中的更新面板中未触发更新按钮
我使用弹出菜单中的更新面板来避免完全回发。 我有两个按钮,一个是添加按钮,另一个是更新按钮。添加按钮正确触发。在select2列表框jquery中更改选择索引时,更新按钮未触发。下面是我的代码C# asp.net中的更新面板中未触发更新按钮,c#,asp.net,C#,Asp.net,我使用弹出菜单中的更新面板来避免完全回发。 我有两个按钮,一个是添加按钮,另一个是更新按钮。添加按钮正确触发。在select2列表框jquery中更改选择索引时,更新按钮未触发。下面是我的代码 <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" > <ContentTemplate> <table> <tr> <td>Custome
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" >
<ContentTemplate>
<table>
<tr>
<td>Customer Name:</td>
<td><asp:ListBox ID="Customer_list" runat="server" style="width:250px" AutoPostBack="true" SelectionMode="Multiple"></asp:ListBox></td>
<td>Favourite Name:</td>
<td><asp:DropDownList ID="fvr_Name" runat="server" style="width:250px"
AutoPostBack="true" onselectedindexchanged="fvr_Name_SelectedIndexChanged" /> </td>
</tr>
<tr>
<td>Name:</td>
<td><asp:TextBox ID="Name_txt" runat="server" /></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><asp:Button ID="btn_Add" Text="Add" runat="server" OnClick="Add_btn_Clicked" Enabled="true" /></td>
<td></td>
<td><asp:Button ID="btn_Update" Text="Update" runat="server"
onclick="btn_Update_Click" /></td>
</tr>
</table>
</ContentTemplate>
<Triggers >
<asp:AsyncPostBackTrigger ControlID="btn_Update" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
客户名称:
喜爱的名字:
姓名:
请帮助我更正此问题。请参见更新面板
部分中的这一行:
<asp:AsyncPostBackTrigger ControlID="btn_Update" EventName="Click" />
您需要为选择索引更改事件添加新触发器:
<Triggers >
<asp:AsyncPostBackTrigger ControlID="btn_Update" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="fvr_Name" EventName="SelectedIndexChanged" />
</Triggers>
thnk u用于您的响应。看完你的回答。我编辑了你发布的代码。但是更新按钮不工作。。。请帮我看看这个: