I have a Web Forms page that creates a CSV file after user has pressed button. It would be nice to give user a busy cursor or status text that tells processing is on.
The problem is that I don't Post or reload that page so how to implement "End of processing" event from Code Behind to User Interface? Otherwise User Interface's Busy cursor is on or status text "Processing..." after CSV file is done.
function myfunc() {
//your code logic here
//update UI
alert("End of processing");
}
Test Result
With Regards,
Fei Han
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Thanks for your answer. Unfortunately I have to call ClientScript.RegisterStartupScript(this.GetType(), "UpdateUI", "myfunc()", true); from User Control (.ascx.cs) and javascript function is placed to User Control too (.ascx) but calling fails.
No error messages. Somehow User Control seems to be different that e.g. Web Forms Page because in Page this works.
None
0 Points
4 Posts
Busy cursor or Processing status when Page isn't Posted or Reloaded?
Sep 04, 2019 01:04 PM|Mickexl|LINK
Hello,
I have a Web Forms page that creates a CSV file after user has pressed button. It would be nice to give user a busy cursor or status text that tells processing is on.
The problem is that I don't Post or reload that page so how to implement "End of processing" event from Code Behind to User Interface? Otherwise User Interface's Busy cursor is on or status text "Processing..." after CSV file is done.
Ideas or samples how to implement this?
Best regards,
Michael
All-Star
40535 Points
6233 Posts
Microsoft
Re: Busy cursor or Processing status when Page isn't Posted or Reloaded?
Sep 05, 2019 03:09 AM|Fei Han - MSFT|LINK
Hi Michael,
After you generated CSV file, you can call JavaScript function from code behind to let user know the processing is finished, like below.
On JavaScript client side
Test Result
With Regards,
Fei Han
None
0 Points
4 Posts
Re: Busy cursor or Processing status when Page isn't Posted or Reloaded?
Sep 05, 2019 11:06 AM|Micco|LINK
Hello,
Thanks for your answer. Unfortunately I have to call ClientScript.RegisterStartupScript(this.GetType(), "UpdateUI", "myfunc()", true); from User Control (.ascx.cs) and javascript function is placed to User Control too (.ascx) but calling fails.
No error messages. Somehow User Control seems to be different that e.g. Web Forms Page because in Page this works.
So, how to get this work in User Control too?
Thanks,
Michael