进度条不使用回发触发器 [英] Progress bar not working with postback trigger

查看:71
本文介绍了进度条不使用回发触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在点击按钮时显示进度条,但它没有工作,因为它有回发触发器。如果我删除帖子后退触发进度条正在显示但我必须把回发触发器显示报告(rdlc)。



谢谢,

K.Vigneshwar

Hi,
I want to show a Progress bar on a button click but it is not working as it has the postback trigger. If i remove the post back trigger progress bar is displaying but i have to put the postback trigger to show the reports(rdlc).

Thanks,
K.Vigneshwar

推荐答案

之前我遇到过同样的问题。

你需要在体内添加这个脚本。

有两个函数,如InitializeRequest和EndRequest,它们将在更新面板分别开始更新和结束更新时调用。



I faced the same problem before.
You need to add this script inside body.
There are two functions like "InitializeRequest" and "EndRequest", which will be called when update panel begin updating and end updating respectively.

<script language="javascript" type="text/javascript">
                <!--
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        function CancelAsyncPostBack() {
            if (prm.get_isInAsyncPostBack()) {
                prm.abortPostBack();
            }
        }
        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);
        var postBackElement;
        function InitializeRequest(sender, args) {
            if (prm.get_isInAsyncPostBack()) {
                args.set_cancel(true);
            }
            postBackElement = args.get_postBackElement();
            if (postBackElement.id == 'btnEdit') {
                // Loading the image which has display none property inside the  UpdateProgress control...(code is provided below)


#loadingImage)。css(' display'' block');

// 减少包含整个页面控件的总表的不透明度...
("#loadingImage").css('display', 'block'); // Reducing the opacity of the total table which contains the whole page controls...


' #totalTable')。 css(' opacity'' < span class =code-string> 0.20');
('#totalTable').css('opacity', '0.20');


这篇关于进度条不使用回发触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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