Causing a page refresh mid-method?



I've got a situation where I would like to make a label control visible
whilst a few-seconds long process runs, something along the lines of
"Please wait...". At the moment this all occurs inside the postback
section of the page load event as:

private void Page_Load(object sender, System.EventArgs e)
{
if(!this.IsPostBack)
{
<...>
}
else
{
<...>
labLookingUp.Visible = true;
string postcode = g.LatitudeLongitudeToPostcode(lat,lon); // The long
running process!!
labLookingUp.Visible = false;
<...>
}
}

But no page update occurs between the Visible = true and Visible =
false, resulting in the control never becoming visible to the user. Is
there any elegant way around this? Cheers.

.



Relevant Pages

  • Out of Office Question
    ... to the sender. ... template. ... Office 2000 running via an Exchange server. ... Prev by Date: ...
    (microsoft.public.outlook)
  • Re: Towers of Hanoi
    ... the way won't help you with the recursion. ... changing the base case to 0 might make it more concise or ... elegant. ... Prev by Date: ...
    (comp.lang.scheme)
  • Re: Progressbar updation problem
    ... I have a timer which is not getting fired at the ... > // While this process is going on i want to show progress bar updating ... > private void timer1_Tick(object sender, ... > So, while the long running process is going on, after every 100 ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Click a button on the form via code?
    ... > private void btnExit_Click(object sender, ... > Get freeware, learn things, make money. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Progressbar updation problem
    ... interval set, when the long process is running on. ... // While this process is going on i want to show progress bar updating ... private void timer1_Tick(object sender, System.EventArgs e) ... So, while the long running process is going on, after every 100 ...
    (microsoft.public.dotnet.framework.compactframework)