– 이곳에 (http://www.mari.kr/tag/UpdateProgress) UpdatePanel과 같이 사용하는 UpdateProgress 컨트롤에 대한 설명이 정말 잘 되 있더군요.

 

아래 코드는 위 사이트에서 가져온 내용인데

정말 잘 분석해두셨네요 ㅎㅎ

 

나중에도 잘 쓸 코드 같습니다.

 

 

<asp:UpdateProgress ID="listViewUpdateProgress" AssociatedUpdatePanelID="listViewUpdatePanel" runat="server" DisplayAfter="50">
    <ProgressTemplate>
    <style type="text/css">

        #UpdateProgressTable {
            position:absolute;
            z-index:100;
            top:0px;
            margin:0px;
            left:0px;
            background-color:#FAFAFA;
            border-width:0px;
            border-style:None;
            font-family:"돋움";
            filter:progid:DXImageTransform.Microsoft.Shadow(color=#ffffff, Direction=0, Strength=0)alpha(Opacity=60);
        }

    </style>
    <script type="text/javascript">
        function UpdateProgressInit() {
            var progress = $get("UpdateProgressTable");
            if (typeof (progress) == "object") {
                progress.style.width = getClientBounds().width;
                progress.style.height = getClientBounds().height;
            }
        }

        function CancelAsyncPostBack() {
            var prm = Sys.WebForms.PageRequestManager.getInstance();
            if (prm.get_isInAsyncPostBack()) {
                prm.abortPostBack();
            }
        }

        function getClientBounds() {
            var clientWidth;
            var clientHeight;

            switch (Sys.Browser.agent) {
                case Sys.Browser.InternetExplorer:
                    clientWidth = document.documentElement.clientWidth;
                    clientHeight = document.documentElement.clientHeight;
                    break;
                case Sys.Browser.Safari:
                    clientWidth = window.innerWidth;
                    clientHeight = window.innerHeight;
                    break;
                case Sys.Browser.Opera:
                    clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
                    clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
                    break;
                default: // Sys.Browser.Firefox, etc.
                    clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
                    clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
                    break;
            }
            returnnewSys.UI.Bounds(0, 0, clientWidth, clientHeight);
        }
    </script>

    <table align="left" id="UpdateProgressTable">
        <tr>
            <td align="center">
                <br/>페이지 변경 중 입니다...
                <br/>
                <input id="Button2" type="button" value="취소" onclick="CancelAsyncPostBack()" />
            </td>
        </tr>
    </table>
    </ProgressTemplate>
</asp:UpdateProgress>

유사한 주제의 글들을 살펴보세요:

, , , ,

Latest Comment

티스토리 툴바