从放在更新面板之外的控制触发一个asp.net事件 [英] Trigger a asp.net event from a control placed outside the update panel

查看:124
本文介绍了从放在更新面板之外的控制触发一个asp.net事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常招的局面。我有作为过滤器中继一些复选框,复选框被放置在一个jQuery的手风琴里面,当我使用AJX更新面板中的jQuery的手风琴停止工作问题出现了。我想通过异步回发来完成的过滤。所以我所做的是我已经把更新面板内的中继器。现在我想用它放在更新面板触发有各自的活动,并更新中继之外复选框的回发选项。这怎么可能。请帮助。

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.

推荐答案

您可以定义触发你的更新面板像下面更新复选框支票变化中继器。

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>

定义后触发定义复选框的CheckedChanged事件,并绑定该事件的中继器。

After Define the trigger define checkbox CheckedChanged event and bind your repeater on that event.

这篇关于从放在更新面板之外的控制触发一个asp.net事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆