问题
I have a very trick situation . i have some check boxes which used as filter for a repeater, and the check boxes are placed inside a jquery accordion , problem arises when i use a ajx update panel the jquery accordion stop working. i want the filtering to be done through async postback. so what i have done is i have placed the repeater inside the update panel. now i want to use the postback option of checkboxes which are placed outside of the update panel to trigger there respective events and update the repeater. How can that be possible. please help.
回答1:
You can define the trigger for Your Update Panel like below to update repeater on checkbox check change.
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
.....
</ContentTemplate>
<Triggers>
<asp:ASyncPostBackTrigger ControlID="CheckBoxId" EventName="CheckedChanged"/>
</Triggers>
<<asp:UpdatePanel>
After Define the trigger define checkbox CheckedChanged event and bind your repeater on that event.
来源:https://stackoverflow.com/questions/17876779/trigger-a-asp-net-event-from-a-control-placed-outside-the-update-panel