views:

4021

answers:

2

I am looking for some sample code/control which gives me the feel of gmail like message box through jQuery in ASP.NET.

+3  A: 

I think what your looking for is jQuery BlockUI.

Have a look at the demo's.

Using css you can match the styles of gmail.

Davy Landman
Excellent plug-in, good find.
Kieron
A: 

You can use plugins, but you can also have a fixed DIV sitting at the top of your page and fade it in/out. Let's see an example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
     <title>jQuery</title>
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
     <script type="text/javascript">
      $(document).ready(function() {
       $('input').click(function() {
        $('#notification').fadeIn('slow');
       });
      });
     </script>
    </head>
    <body style="height: 1000px;">
     <div id="notification" style="position: fixed; top: 0px; margin-left: 50%; background-color: yellow; font-weight: bold; display: none;">Sending...</div>
     <input type="button" value="Gmail notification!" />
    </body>
</html>

You have to work out how to hide it (a callback after the operation completes, etc.), style it and so on. That's just an example.

Pawel Krakowiak