Long running searches

Discussion in 'ASP .Net' started by David Kleyman, Jan 6, 2004.

  1. 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
    David Kleyman, Jan 6, 2004
    #1
    1. Advertising

  2. David Kleyman

    Hermit Dave Guest

    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

    --
    Regards,

    HD

    "David Kleyman" <> wrote in message
    news:...
    > 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
    >
    >
    Hermit Dave, Jan 6, 2004
    #2
    1. Advertising

  3. David Kleyman

    Curt_C [MVP] Guest

    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.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "David Kleyman" <> wrote in message
    news:...
    > 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
    >
    >
    Curt_C [MVP], Jan 6, 2004
    #3
  4. I can't find the posts that you referring to

    Can you point them out?

    David

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:%...
    > 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.
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > www.Darkfalz.com
    >
    >
    > "David Kleyman" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
    David Kleyman, Jan 6, 2004
    #4
  5. David Kleyman

    Curt_C [MVP] Guest

    look here then
    http://www.aspnetpro.com/NewsletterArticle/2003/08/asp200308bm_l/asp200308bm_l.asp


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "David Kleyman" <> wrote in message
    news:...
    > I can't find the posts that you referring to
    >
    > Can you point them out?
    >
    > David
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:%...
    > > 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.
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > www.Darkfalz.com
    > >
    > >
    > > "David Kleyman" <> wrote in message
    > > news:...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
    Curt_C [MVP], Jan 6, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    657
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,174
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    458
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    778
    Peter Nilsson
    Jan 15, 2008
  5. veryhotsausage
    Replies:
    1
    Views:
    1,773
    veryhotsausage
    Jul 4, 2008
Loading...

Share This Page