Long running searches

  • Thread starter Thread starter David Kleyman
  • Start date Start date
D

David Kleyman

Hello

I am trying to display "Please wait..." message on a page while page is
retrieving data from SQL server
I have this code in place but it does not seem to be working
Private Sub cmdSearch_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdSearch.Click

...

lblMessage.Text = "Please wait..."

' do the search

.....

end Sub



Is there something I am doing wrong

Thank you

David
 
The reason it is not working is because you are assigning the value to the
label in the event handler for command object.
and the actual rendering of the server control doesnt start until after the
end.

What you could try is the classic

Response.Write("Please wait");
Response.Flush();

' your code to do the search

HTH
 
Correct... that's due to the client never getting the info until the data is
rendered......
There were some suggestions posted on this earlier today that you should
look at. If you look back you should see them.
 
Back
Top