Force A PostBack VIA ASP Code
Posted on 2009-04-21
I have some code that runs on a PostBack event. If during this PostBack a certain situation is found, the code displays a hidden panel at the end of the PostBack run which has an animated gif.
This animation should run while some new code (which can be time consuming) runs. Problem is, that if I run this time consuming code within the same PostBack operation in the 1st paragraph, the current page (reloaded with the unhidden panel) hasn't yet shown itself, so the user doesn't see the panel and animation yet.
What I would like to be able to do, is have the current PostBack operation finish building the page with the new unhidden panel so that it displays to the use. Then somehow tell the system to perform another "forced" PostBack immediatly after, in which I have code that checks to see if this panel is visible, if it is then the time consuming peice of code is run.
Is there anyway to do this?