Solved

How and which event to change mouse cursor to show users the web application is working on the request after they click?

Posted on 2015-01-08
2
240 Views
Last Modified: 2015-01-08
Hi, I'm using vs2012.
I have a page with a gridview that is bind to a data source.
I would like to change the mouse cursor to animating hour glass when user loads the page or when they click on either Edit, Update or Cancel button on the gridview.  Which events would be appropriate to do this and how to do this in C# or asp.net code?  Thank you.
0
Comment
Question by:lapucca
2 Comments
 
LVL 18

Accepted Solution

by:
Jerry Miller earned 500 total points
Comment Utility
I found a small Ajax control to display a loading image. I know this is VB, but it should easily translate into C#.

Here is my ascx content:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="UpdateProgress.ascx.vb" Inherits="Controls_UpdateProgress" %>

<link href="../Styles/style.css" rel="stylesheet" type="text/css" />
 <asp:UpdateProgress ID="RoleRightUpdateProgress" runat="server">
        <ProgressTemplate>
            <asp:Image ID="loadingImage" runat="server" src="../Images/ajax_loader.gif" alt="Loading" CssClass="loadingLeftBottom" />
        </ProgressTemplate>
 </asp:UpdateProgress>

Open in new window


My ascx.vb content:
Partial Class Controls_UpdateProgress
    Inherits System.Web.UI.UserControl
End Class

Open in new window


In the top of the pages that contain an UpdatePanel where I want this to display, I register the control.

<%@ Register Src="~/Controls/UpdateProgress.ascx" TagName="updateProgress" TagPrefix="uc1" %>

Open in new window


and call it in the area where I want to display the image:
 <%--show progress icon when the panel is updating--%>  
    <uc1:updateProgress runat="server" ID="ucUpdateProgress" />

Open in new window


http://msdn.microsoft.com/en-us/library/bb386421(v=vs.140).aspx
0
 

Author Closing Comment

by:lapucca
Comment Utility
That's great, thank you.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now