I have a large ASP.NET Web form that takes a lot of server side processing time. How do I display a message, or redirect to a temporary Web page, until the processing is finished, then redisplay the original Web form?
The trick is not to redirect to another page, but rather to render some progress information while the server is working. One way of doing this is to render an <img> tag as soon as the page is loaded (or initialized), without anything else (even the <html> opening tag), or maybe some dots. The image can be an animated GIF, which simulates progress. Once the full page rendering process emits the appropriate <html> tags, the image will disappear and overwritten by the new page.
Another workaround is to emit a <div> with an ID and emit a script that hides it at the bottom of the page. Here goes some code that does the trick:
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.