Refresh or DoEvents?

holtzy

Newcomer
Joined
Nov 29, 2005
Messages
6
I'm new to ASP.NET, so this I'm sure is a simple question. I'm trying to keep the user posted as to what the code is doing as my code runs. Something like
Visual Basic:
'Some code here

        'Show user what is going on
        Span2.InnerHtml = "Still working...please hold"

        'Some more code that takes a while

        'Show user what is going on
        Span2.InnerHtml = "Finally finshed, thanks for waiting"
This code I have now doesn't work right. You don't see the the first one. All you ever see is the "Finally finshed, thanks for waiting". It's like it doesn't update or refresh the text displayed to the user till the sub (button click event) is completely done running.
 
This sort of thing, on the web, will have to be done via javascript or some other client side scripting. Using the codebehind of ASP.NET means that the page is still kept in the buffer until the page is done. There are ways to flush it, but it sounds like you want something else.

What's the effect you're going after? Just a simple "Please wait..." that moves or something much nicer, that actually shows like an accurate progress bar?

-ner
 
Back
Top