Re: Causing a page refresh mid-method?



On Fri, 01 Jul 2005 10:15:27 -0700, Kieran Benton wrote:

> 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.
Nothing too elegant, I am afraid. But you can render javascript that uses
a timer to refresh the label with whatever you want.

.



Relevant Pages

  • Causing a page refresh mid-method?
    ... private void Page_Load(object sender, System.EventArgs e) ... there any elegant way around this? ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Wireless USB connection (not WUSB)
    ... Ian: I'm afraid your solution, however elegant, is way out of my ... league. ...
    (alt.internet.wireless)
  • Re: [9fans] cs lookup feature
    ... > now if only i could figure out how to do this in unix. ... where "b" is in your local domain zone. ... Not elegant, not portable, ... Be afraid, be very afraid :-) ...
    (comp.os.plan9)
  • Re: [9fans] cs lookup feature
    ... > now if only i could figure out how to do this in unix. ... where "b" is in your local domain zone. ... Not elegant, not portable, ... Be afraid, be very afraid :-) ...
    (comp.os.plan9)