how to show a busy icon when processing a work)

Discussion in 'ASP .Net' started by =?Utf-8?B?SG9seXNtb2tl?=, Dec 14, 2005.

  1. Hi,

    I have a asp.net form with a button in it.

    In the onlclick event of button I want to write a function which does some a
    bit of work with a timespan of 15 seconds. So I want to show a image
    something like "Work In Progress" when this process is going on and hide it
    when the work done

    I do something like this button click event

    Private Sub butArchive_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles butArchive.Click

    imgArchiveInProgress.Visible = True 'Icon to show work in progress
    lblInfo.Text = "Work In Progress" 'Text

    Response.Flush()

    System.Threading.Thread.Sleep(15000) 'Simulate work for 15 seconds

    imgArchiveInProgress.Visible = False
    lblInfo.Text = ""

    End Sub


    It does not work.I have to tried too flush the buffer before start
    processing but still does n't work?!

    I appreciate your help,

    TIA,
    Holy
     
    =?Utf-8?B?SG9seXNtb2tl?=, Dec 14, 2005
    #1
    1. Advertising

  2. Use Dave and Al's samples at :
    http://www.daveandal.net/books/6744/samples.aspx

    See the chapter 3 samples.
    The code is available on each sample page.



    Juan T. Llibre
    ASP.NET MVP
    ============
    "Holysmoke" <> wrote in message
    news:...
    > Hi,
    >
    > I have a asp.net form with a button in it.
    >
    > In the onlclick event of button I want to write a function which does some a
    > bit of work with a timespan of 15 seconds. So I want to show a image
    > something like "Work In Progress" when this process is going on and hide it
    > when the work done
    >
    > I do something like this button click event
    >
    > Private Sub butArchive_Click(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles butArchive.Click
    >
    > imgArchiveInProgress.Visible = True 'Icon to show work in progress
    > lblInfo.Text = "Work In Progress" 'Text
    >
    > Response.Flush()
    >
    > System.Threading.Thread.Sleep(15000) 'Simulate work for 15 seconds
    >
    > imgArchiveInProgress.Visible = False
    > lblInfo.Text = ""
    >
    > End Sub
    >
    >
    > It does not work.I have to tried too flush the buffer before start
    > processing but still does n't work?!
    >
    > I appreciate your help,
    >
    > TIA,
    > Holy
    >
    >
    >
     
    Juan T. Llibre, Dec 14, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?SG9seXNtb2tl?=

    Karl Seguin Guest

    Personally, I think http://blogs.crsw.com/mark/articles/642.aspx is one of
    the nicest ones out there.

    Karl

    --

    MY ASP.Net tutorials
    http://www.openmymind.net/



    "Juan T. Llibre" <> wrote in message
    news:...
    > Use Dave and Al's samples at :
    > http://www.daveandal.net/books/6744/samples.aspx
    >
    > See the chapter 3 samples.
    > The code is available on each sample page.
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > ============
    > "Holysmoke" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> I have a asp.net form with a button in it.
    >>
    >> In the onlclick event of button I want to write a function which does
    >> some a
    >> bit of work with a timespan of 15 seconds. So I want to show a image
    >> something like "Work In Progress" when this process is going on and hide
    >> it
    >> when the work done
    >>
    >> I do something like this button click event
    >>
    >> Private Sub butArchive_Click(ByVal sender As System.Object, ByVal e As
    >> System.EventArgs) Handles butArchive.Click
    >>
    >> imgArchiveInProgress.Visible = True 'Icon to show work in progress
    >> lblInfo.Text = "Work In Progress" 'Text
    >>
    >> Response.Flush()
    >>
    >> System.Threading.Thread.Sleep(15000) 'Simulate work for 15 seconds
    >>
    >> imgArchiveInProgress.Visible = False
    >> lblInfo.Text = ""
    >>
    >> End Sub
    >>
    >>
    >> It does not work.I have to tried too flush the buffer before start
    >> processing but still does n't work?!
    >>
    >> I appreciate your help,
    >>
    >> TIA,
    >> Holy
    >>
    >>
    >>

    >
    >
     
    Karl Seguin, Dec 14, 2005
    #3
    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. Miro Durcik

    app.rc resource's icon to .net Icon

    Miro Durcik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,439
    Miro Durcik
    Oct 9, 2004
  2. Manish Hatwalne

    Re: show icon in system tray?

    Manish Hatwalne, Jul 15, 2003, in forum: Java
    Replies:
    1
    Views:
    453
    Joona I Palaste
    Jul 15, 2003
  3. Dan Polansky
    Replies:
    3
    Views:
    871
    Larry Barowski
    Feb 12, 2007
  4. Bodi
    Replies:
    1
    Views:
    321
    Lasse Reichstein Nielsen
    Nov 18, 2003
  5. shankwheat

    AJAX Style processing icon

    shankwheat, Apr 13, 2007, in forum: Javascript
    Replies:
    10
    Views:
    233
Loading...

Share This Page