Display an animated gif on an ASP.NET VB.NET webpage to indicate file copying in progress

On my webpage, I have a button that copies a file to the server. I want to display an animated file copy gif on the screen while the copying process is ongoing, and then hide it once the file has been successfully copied:


me.image.visible = true
copy file routine.....
me.image.visible = false

The file is being copied properly by the button, but the animated gif is not visible because its visibility is toggled within the code without triggering a postback to refresh the screen.

If this is not the correct approach, what alternative method should I pursue?

Answer №1

Avoid getting caught up in the endless loop of animated .gifs - it can be maddening. Stick to clean, efficient code with Spin.js.

This tool is guaranteed to be the top choice for your project.

Find out more about Spin.js here

Answer №2

If you are absolutely determined to use the gif (and not simply switching the cursor from default to waiting), consider creating a form with a transparent background and a borderless picture box. Set the picture box's image to be the gif file itself.

Alternatively, you could opt for setting the mouse cursor as a wait cursor instead of going through the trouble of adding a gif.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Navigating to a different page in the app following a document update: a step-by-step guide

I am facing an issue with a page where I am trying to print a specific DIV using the script below... function printReceiptDiv() { var divElements; if (vm.isDLR) { divElements = document.getElementById("DLRreportCont ...

The error message "Each item within a list must be assigned a unique 'key' prop" is being displayed

At the moment, I'm immersed in a project that utilizes React, Next.js, and Ant-Design. However, during the development process, I encountered an error due to the absence of a unique key like so: Here's the detailed log of the error: Warning: Ea ...

MongoDB subfield pagination technique

I am looking to retrieve specific data from a sub-field in a MongoDB collection and implement pagination for it. Thank you! { "_id": "616d274c655e0000ee005f32", "subscription": [ { "account_admin&q ...

Error in AngularJS ngRepeat Syntax

While using AngularJS v1.3.15 I encountered a strange syntax error: http://errors.angularjs.org/1.3.15/ngRepeat/iexp?p0=item%20asNaNtems This is the code snippet from my template (templateUrl): <div class="context-menu" ng-if="showMenu"> &l ...

Error: SignalR Server has sent a "Close" message

I have been struggling with this error for quite a while. I am trying to make signalr listen to my 2 methods. It works perfectly when I comment out the (this) methods. However, it does not work. Can anyone help me figure this out? Sometimes I can retrieve ...

document.addEventListener versus $().on

Recently, I came across an odd behavior while trying to add event listeners to the document. Strangely, when adding listeners to HTMLElements, everything worked smoothly, but for some reason, adding a listener to the document did not have any effect. Howev ...

Modifying language in Kendo UI

I am currently using Kendo UI to develop grids and applying the data-filterable option for data filtration. My requirement is to switch the language from English to Polish. How can I achieve this? https://i.sstatic.net/J5PEa.png Below is the script I am ...

Next.js Pre-rendering Issue: Error encountered when trying to access properties of a null object

Using Next.js for a React application (full code available here.) Encountering an unusual error while running next build, showing errors related to prerendering on five pages: spenc@WhiteBoxu:~/workout-tracker$ next build info - Loaded env from /home/spe ...

Manipulating State in React: How to add a property to an object within an array within a component's state

Currently, I am retrieving an array of objects stored in the state, and I am attempting to include a new property to each of these objects. However, I am encountering a problem where even though I can see the new property being added to each object, when ...

Getting files from a server in ReactJS: Step-by-step guide

Currently, I am utilizing an API to retrieve file paths from the server. However, I am looking to enhance the functionality by allowing users to download these files upon clicking on them. To achieve this, I am leveraging the react js-file download package ...

Change ES6 JavaScript to ES5 standard

Is there a way to transform this code snippet from other questions into ES5 format? I am attempting to extract data from a JSON array. var match = function(query, input) { return input.filter(function(entry) { return Object.entries(query).every(fun ...

Automatically numbering table columns with custom language localization in JavaScript using Jquery

Is there a method to automatically number table data in a local or custom language? As a Bengali individual, I have figured out how to automatically number the first data of each row using css and js. However, I am uncertain about how to implement custom n ...

unable to attach picture to the img element

Currently, I am honing my skills in Windows Phone development through WinJS. In my latest project, I have crafted a code snippet that parses JSON data fetched from a specific URL. The objective is to bind the images retrieved to a list view on an HTML page ...

Prevent click event listener from activating if the click results in a new tab or window being opened

Occasionally, when using my web app, I need to prevent click event listeners from activating if the click is meant to open a new window or tab. For instance, in my single page application, there are links to other content. While they function well, there i ...

The year slider on d3 showcases the specific regions between each incremental step

I am working on creating a step slider in d3 (v5) that spans from the years 2000 to 2021 using the d3-simple-slider plugin. const slider = sliderBottom() .min(new Date(2000, 1, 1)) .max(new Date(2020, 1, 1)) .tickFormat(d3.timeFormat(& ...

Initialize data only when the Nuxt.js application is first loaded

Exploring the world of nuxt.js, I find myself pondering on the most efficient way to fetch data using REST api. Within my store folder, the structure is as follows: store -posts.js -categories.js -index.js Initially, I attempted to set the da ...

Using double parentheses in JavaScript

Although I am not a JS/Front-end developer, I currently need to dive into one of React.JS UI libraries. During my exploration, I stumbled upon something that seems unusual to me. return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TextFieldRoot, (0, _extends2.defaul ...

Extract the URL contained within the <a> tag using the src attribute of an <img> tag automatically

At first glance, this question may seem odd, but I haven't discovered any other method to resolve the issue. Please bear with me as I explain my objective in detail! Currently, I am utilizing a lightbox to showcase an image that enlarges when clicked ...

How to retrieve the initial element of a specific tag using jQuery

As I am transitioning from standard JavaScript to jQuery in order to achieve cross browser compatibility, I am seeking guidance on how to rewrite certain functions in jQuery. Specifically, I am looking for the correct way to find the first element using jQ ...

Getting Started with Arrays in JavaScript

I've been working on improving my JavaScript skills but I seem to have hit a roadblock. var schemes = { "own" : { "creatures" : ["creature1","creature2","creature3","creature4"], "spells" : ["spell1","spell2","spell3","spell4"], ...