Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net Show "please wait " message as page loads

Hi

I am currently using the JavaScript further down to put a "Processing..please wait" message up while VB.net code runs (interacting SQL).
This all runs on a button click. How do I do the same for the following Page_Load event. Thanks

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Call Load_School_Names()
            Me.btnSaveAdditionalChild.Visible = False
        End If
    End Sub

Open in new window



    	<style type="text/css">
		.pleaseWait { width: 50%; height: 100px; background-color: #cccccc; display: none; z-index:999; position:absolute; left:25%; top:10%}
	</style>
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
	<script type="text/javascript">
		//<![CDATA[
	    function showLoading() {
	        $('.pleaseWait').show();
	    }
		//]]>
       </script>

Open in new window


          <div class="pleaseWait">Processing... please wait!</div>
		                     <div>
                        <asp:Button ID="btnSave" runat="server" BackColor="White" Font-Names="Calibri" 
                            ForeColor="#003399" Height="29px" Text="Save" Width="217px" OnClientClick="showLoading();" />
           
                            </div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Robberbaron (robr)
Robberbaron (robr)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks for the advice