Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2009, 01:05 PM
Authorized User
 
Join Date: May 2007
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Question locking out the screen while postback

Hi All

I have searched a lot on internet regarding locking out screen during postback but none seem to be working for me. I have a gridview with a textbox in the footer. On textbox text change event, i am hitting server and in turn doing a lot of validations. This is taking 4 to 5 seconds of time normally. I want to blackout the whole screen and have to show user a message "Processing, wait a while....". How to do this? Please throw some light...

-- Abhishek
 
Old August 17th, 2009, 07:30 AM
Authorized User
 
Join Date: Aug 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

good query
 
Old August 17th, 2009, 08:56 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default Use a modal...

Just use a modal. With AJAX there is the modal extender or you could just as easily use javascript.

something like

Javscript
Code:
<script language='javascript' type='text/javascript'>
    function showLoading()
       {
        document.getElementById('blackOut').style.display = 'block';
        document.getElementById('blackOut').style.height = '100%';
        document.getElementById('blackOut').style.width = '100%';
       }
</script>
then just create a hidden div and place somewhere on your page
Code:
            <div id="blackOut" style="display: none; position: absolute; background-color: black; filter: alpha(opacity=70); -moz-opacity: 0.7; opacity: 0.7; z-index: 999; top: 0px; left: 0px; height: 1%; width: 1%; ">
      <table width="100%" height="100%">
      <tr>
      <td align="center" valign="middle">
            <h2 style="color: White; font-weight: bold">Processing...</h2>
      </td>
      </tr>
      </table>
  </div>
then your code for your textbox
Code:
        <asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChaged" onblur="showLoading();"></asp:TextBox>
again this is just a BASIC example. The height = '100%' isn't supported in older browsers from what i understand but i'm sure you can come up with some method of getting the screen size. But the modalpopupextender might be the easiest thing for you to use.
__________________
Jason Hall

Follow me on Twitter @jhall2013





Similar Threads
Thread Thread Starter Forum Replies Last Post
how can clear the screen the screen malli_kv2 BOOK: Beginning Java 2, JDK 5 Edition 4 January 17th, 2009 12:43 AM
Form Locking dancook Access VBA 2 November 7th, 2006 11:38 AM
Draw on the screen without clearing the screen pu132 Visual Basic 2005 Basics 0 August 25th, 2006 09:03 PM
locking of records vincentc Classic ASP Professional 4 August 19th, 2003 04:40 AM
Locking Peter Riley SQL Server ASP 3 June 5th, 2003 07:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.