asp.net中带有更新面板的灯箱 [英] lightbox with update panel in asp.net

查看:73
本文介绍了asp.net中带有更新面板的灯箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,
我正在使用性感灯箱通过单击查看链接来显示一些信息
在gridview中.
灯箱代码在Jquery(sexylightbox.v2.2.mootools.js)中
没有更新面板时,它可以正常工作.

现在,我想在页面中使用Updatepanel.第一次灯箱
正确打开.但是当我单击排序或搜索灯箱时,未打开并给出了一些错误.
我的意思是性感的灯箱在回发后不起作用.请任何人解决我的问题,或者也欢迎其他备用灯箱.

在此先感谢

Dear friends,
I am using sexy lightbox to show some information by clicking on View link
in the gridview.
the light box code is in Jquery(sexylightbox.v2.2.mootools.js)
It works proper when there is no update panel.

Now i want to use Updatepanel in my page. First time the light box
opens properly. but when i click on sorting or searching light box is not opening and gives some error.
I mean sexy light box is not working after the postback. Please can anybody solve my problem or any alternate light box is also welcomed.

Thanks in advance

推荐答案

尝试一下..
在脚本管理器之后添加其工作.....

Try This..
add after script manager its working.....

<script type="text/javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
        function EndRequest(sender, args) {
            Lightbox.initialize()
        }
</script>


您是否在JS文件中的某处使用这样的代码?

Are you using code like this somewhere in a JS file?


(document).ready(function(){ SexyLightbox.initialize(); });
(document).ready(function(){ SexyLightbox.initialize(); });



如果是,则此功能不适用于更新面板.

在Page_Load事件中尝试以下代码.



If yes, this will not work with update panel.

Try the following code in Page_Load event.

string script = "


这篇关于asp.net中带有更新面板的灯箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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