Displaying live updating information (Progress) on my website

I'm in the process of creating a web page that displays data from a datatable in a grid view. There's also a button labeled "Send To Excel." When a user clicks this button, the program begins generating a report by writing the datatable content into an Excel file. Once the process is complete, a hyperlink appears for the user to download the Excel file.

Some of the reports are quite large, so it takes time to generate the Excel file.

I would like to display some information while the Excel file is being generated. For example:

10 records generated. 20 records generated. 30 records generated. .. finished.

The above sentences should appear on the same line, with each sentence replacing the previous one. This data insertion is done within a For loop, allowing us to track progress using this loop. I am working with VB.NET, ajax, jquery, css to develop this functionality.

Any ideas? Please share your suggestions. Thanks in advance!

Answer №1

One simple and efficient method to achieve this is by utilizing the Ajax.NET UpdateProgress control. This control will show a "thinking" GIF animation as the report is being generated.

Check out more information here

Answer №2

When it comes to web development, one of the common challenges you may face is the inability to update the user interface while the server is busy processing a request. This means that there can't be seamless communication between the client and server during a single request.

One solution to this issue could involve having the initial request trigger a new thread for processing purposes, allowing the request to be returned immediately. The processing thread would then update a database with progress information, which the client can constantly check by making ajax calls to the database.

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

What are the constraints to consider when working with JSON in a practical setting

I find myself at a pivotal point in my application design process. The project at hand is an ASP.NET web application that utilizes REST to request information on various products. Some of these products have different ProductIDs based on their attributes a ...

Filtering Gridviews with Javascript or jQuery

My current project involves using an ASP.NET GridView with multiple ListBoxes representing Departments, Categories, Faculties, and more. The data in these ListBoxes and the GridView is dynamically loaded from a MSSQL database in the codebehind. I am in ne ...

Using Hibernate to store Ajax responses in an ArrayList

I am currently working on a project that requires specific functionality: if the user selects a particular type from a dropdown menu, then the corresponding data should be displayed in the next dropdown menu. For example, there are 3 lists - pricelist, sla ...

The JavaScript code is unable to locate a specific variable in the file

Experiencing an issue with hasAttr.js where it is unable to locate the variable :jQuery. Assistance would be greatly appreciated. Just beginning my journey on the client side. ...

Executing third-party libraries in R.net on IIS

We are facing a challenge while attempting to execute R.net from an ASP.Net webpage in IIS as the R engine fails to access external libraries. Despite trying common solutions, we have not been able to resolve this issue specifically within IIS (as opposed ...

Arranging buttons that are generated dynamically in a vertical alignment

Currently, I am in the process of creating a webpage for various items, and everything is going well so far. However, I have encountered an issue while attempting to vertically align the buttons that I am generating using JavaScript within the document. I ...

CSS :hover problem, text appearing unexpectedly

I'm currently working on designing a logo that displays hidden text when hovered over, providing instructions to users. However, I've encountered an issue where the hidden text reveals itself even before the logo is hovered over. This is frustrat ...

Unable to retrieve cookies post redirect in Django

I recently encountered an issue that I need help with. Allow me to explain in a simpler manner. My goal is to have a user click on a button on website A, triggering an AJAX post request to a Django view. Within this view, I use response.set_cookie to set ...

Looking to align a radio button in the middle of an inline-block?

Is it possible to center a radio button within an inline-block? I have provided a demo on JSFiddle that displays the current layout and how I envision it should appear. Check out the demo here Here is the code snippet in question: <span style="widt ...

Unraveling an UPDATE sql statement

I am looking to create a log function in ASP, and in order to accomplish that, I need to be able to parse the UPDATE SQL statement. If I have an SQL statement similar to this: UPDATE mytable SET aaa='test',bbb=123 WHERE id=508 My desired outpu ...

Issue with CSS color gradient transparency

I've successfully implemented a gradient that transitions from transparent to white by using the following CSS code: linear-gradient(to right, transparent, white) If you want to see it in action, click on this link: http://jsfiddle.net/fs8gpha2/ Al ...

`The header navigation is not responding to window resizing functionality`

I am currently developing a header navigation that consists of a logo on the left side, a profile icon on the right side, and some navigation links in the middle. A left slide menu has been implemented to trigger when the window width is less than 700px. ...

Move the element from the center of the screen back to its starting position

Looking to craft a single animation that will transition elements from the center of the current view back to their original positions. Unfortunately, CSS animations do not support toggling the display property. This limitation causes the second rectangle ...

Invert the jQuery function if the input is marked as selected

I successfully implemented a function to sort a list based on the content of a span element. var list = $("ul#videosList"); var desc= false; list.append(list.children().get().sort(function(a, b) { var aProp = $(a).find("span").text(), bProp = ...

Having trouble displaying the fancybox helper buttons

I had everything working perfectly, but suddenly it stopped and I can't figure out what went wrong. I just need the left, right arrows, and helper buttons to appear when fancybox is open. Any assistance would be greatly appreciated. PS: All the neces ...

Is it possible to repeatedly activate a function using onmousedown just like with onkeydown?

My goal is to have the onmousedown event trigger repeatedly when the left mouse button is held down, instead of just once upon clicking. Currently, it only fires a single time. wHandle.onmousedown = function (event) { console.log('mouse b ...

Do RESTful APIs require CSRF validation?

On the FOSRestBundle page, it mentions the issue of CSRF validation when trying to handle forms for both HTML and REST API. The extension allows for disabling CSRF validation for users with specific roles to accommodate REST API usage while still securing ...

Is the Expand All / Collapse All feature malfunctioning when used with a tree table?

I have been working on implementing the Expand All/Collapse All feature for a nested tree table, but unfortunately, I am not achieving the desired output. I referred to a related question on this topic which can be found here. You can also view the code on ...

The feature of Switch css does not appear to function properly when used in conjunction with input type

Why does the switch button not work with the input type radio but works with a checkbox button? How can I maintain the radio input and solve this issue? @charset "utf-8"; /* CSS Document */ /* ---------- GENERAL ---------- */ body { background: #4a4a4 ...

Show input field depending on chosen option

I'm looking to create a dynamic form where specific input fields are displayed based on the selection made in another field. For example, if "gender: male" is selected, the input field for "blue" should appear, and if "gender: female" is selected, the ...