Hi all,
Here is a beginner question
I am working on a ASPX webpage where I have a ASP button that triggers a serie of event (C# code behind) that takes about 10 seconds to execute. I basicly want a Label to appear on the page just after the button_click event to let the user know that "work is in progress". I created an invisible label and set his text to "work in progress". In the code behind the button_click event, I added at the top the instruction to make that label visible before the rest of the processing starts. The problem is: the web page is not releaded in the browser before all the code behind the button_click event is executed. So we never see my lablel on the screen until 10 seconds later, when all the processing is actually done. Is there a way to force the page reload or is there any other way to display a "in progress" label while the rest of the codebehind is executed?

Thanks,
Tristan

Recommended Answers

All 2 Replies

call a javascript before the C# code is to be executed.

Use the built-in AJAX controls to do this. Call the thread.sleep function to make the illusion of a wait time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.