How to make visible an image (gif anim.) while wait for a task to finish

Discussion in 'ASP .Net' started by pamelafluente@libero.it, Aug 16, 2006.

  1. Guest

    I am reposting hoping better luck :)

    I can't achieve this simple thing: I have an animated gif in an image
    control (ImageProgress1). The image visibility is set to false. I want
    that when the User click on a given button (ButtonSomeLongTask) to
    execute a long task Me.ImageProgress1 become visible until the task on
    the server is finished. I call the task this way:

    Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    e As System.EventArgs) Handles ButtonSomeLongTast.Click
    ExecuteLongTask() 'here there is a call to a web service
    End Sub

    Any *simple* example to do it?

    -Pam
    , Aug 16, 2006
    #1
    1. Advertising

  2. this will not work. in the asp.net from processing model, a button click
    posts back, and the page is rebuilt and sent back to the browser. this means
    the brwser will not see the html to display the gif until all the server
    processing is done.

    you can set the gif with client code, but in general animated gifs will not
    run during a postback. the best solution is start the long running process
    in a background thread, and poll for completion. google this newgroup for
    processing message, and you shoudl find examples.

    -- bruce (sqlwork.com)

    <> wrote in message
    news:...
    >I am reposting hoping better luck :)
    >
    > I can't achieve this simple thing: I have an animated gif in an image
    > control (ImageProgress1). The image visibility is set to false. I want
    > that when the User click on a given button (ButtonSomeLongTask) to
    > execute a long task Me.ImageProgress1 become visible until the task on
    > the server is finished. I call the task this way:
    >
    > Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    > e As System.EventArgs) Handles ButtonSomeLongTast.Click
    > ExecuteLongTask() 'here there is a call to a web service
    > End Sub
    >
    > Any *simple* example to do it?
    >
    > -Pam
    >
    bruce barker \(sqlwork.com\), Aug 16, 2006
    #2
    1. Advertising

  3. Guest

    Re: How to entertain the user

    I see :( Thanks bruce.
    Apart animated gif, is there any simple solution I can use to entertain
    the user during a long running task, possibly without spending a week
    to implement it ? I have seen some of such nice animations, but I am
    unsure about the technology they used.

    -Pam

    bruce barker (sqlwork.com) ha scritto:

    > this will not work. in the asp.net from processing model, a button click
    > posts back, and the page is rebuilt and sent back to the browser. this means
    > the brwser will not see the html to display the gif until all the server
    > processing is done.
    >
    > you can set the gif with client code, but in general animated gifs will not
    > run during a postback. the best solution is start the long running process
    > in a background thread, and poll for completion. google this newgroup for
    > processing message, and you shoudl find examples.
    >
    > -- bruce (sqlwork.com)
    >
    > <> wrote in message
    > news:...
    > >I am reposting hoping better luck :)
    > >
    > > I can't achieve this simple thing: I have an animated gif in an image
    > > control (ImageProgress1). The image visibility is set to false. I want
    > > that when the User click on a given button (ButtonSomeLongTask) to
    > > execute a long task Me.ImageProgress1 become visible until the task on
    > > the server is finished. I call the task this way:
    > >
    > > Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    > > e As System.EventArgs) Handles ButtonSomeLongTast.Click
    > > ExecuteLongTask() 'here there is a call to a web service
    > > End Sub
    > >
    > > Any *simple* example to do it?
    > >
    > > -Pam
    > >
    , Aug 16, 2006
    #3
  4. mc Guest

    Re: How to entertain the user

    How About:-

    place the gif on the page and set it's style to "display:none" then in
    your code set the onClientClick to some Javascript which un-hides the
    image, this will then be visible to the user until the post back has
    been completed and the new page is sent out?

    never actually tried this myself but it seems to make sense in my head!

    Have you thought about Atlas? You can use an update progress control to
    display some custom text/graphic whilst the Ajax post back is completing.


    wrote:
    > I see :( Thanks bruce.
    > Apart animated gif, is there any simple solution I can use to entertain
    > the user during a long running task, possibly without spending a week
    > to implement it ? I have seen some of such nice animations, but I am
    > unsure about the technology they used.
    >
    > -Pam
    >
    > bruce barker (sqlwork.com) ha scritto:
    >
    >
    >>this will not work. in the asp.net from processing model, a button click
    >>posts back, and the page is rebuilt and sent back to the browser. this means
    >>the brwser will not see the html to display the gif until all the server
    >>processing is done.
    >>
    >>you can set the gif with client code, but in general animated gifs will not
    >>run during a postback. the best solution is start the long running process
    >>in a background thread, and poll for completion. google this newgroup for
    >>processing message, and you shoudl find examples.
    >>
    >>-- bruce (sqlwork.com)
    >>
    >><> wrote in message
    >>news:...
    >>
    >>>I am reposting hoping better luck :)
    >>>
    >>>I can't achieve this simple thing: I have an animated gif in an image
    >>>control (ImageProgress1). The image visibility is set to false. I want
    >>>that when the User click on a given button (ButtonSomeLongTask) to
    >>>execute a long task Me.ImageProgress1 become visible until the task on
    >>>the server is finished. I call the task this way:
    >>>
    >>> Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    >>>e As System.EventArgs) Handles ButtonSomeLongTast.Click
    >>> ExecuteLongTask() 'here there is a call to a web service
    >>> End Sub
    >>>
    >>>Any *simple* example to do it?
    >>>
    >>>-Pam
    >>>

    >
    >
    mc, Aug 17, 2006
    #4
  5. Guest

    Re: How to entertain the user

    hmmm, no it does not seem to work. If you have it working please let me
    know.

    Perhaps the images must be animated manually by javascript.

    -p

    mc ha scritto:

    > How About:-
    >
    > place the gif on the page and set it's style to "display:none" then in
    > your code set the onClientClick to some Javascript which un-hides the
    > image, this will then be visible to the user until the post back has
    > been completed and the new page is sent out?
    >
    > never actually tried this myself but it seems to make sense in my head!
    >
    > Have you thought about Atlas? You can use an update progress control to
    > display some custom text/graphic whilst the Ajax post back is completing.
    >
    >
    > wrote:
    > > I see :( Thanks bruce.
    > > Apart animated gif, is there any simple solution I can use to entertain
    > > the user during a long running task, possibly without spending a week
    > > to implement it ? I have seen some of such nice animations, but I am
    > > unsure about the technology they used.
    > >
    > > -Pam
    > >
    > > bruce barker (sqlwork.com) ha scritto:
    > >
    > >
    > >>this will not work. in the asp.net from processing model, a button click
    > >>posts back, and the page is rebuilt and sent back to the browser. this means
    > >>the brwser will not see the html to display the gif until all the server
    > >>processing is done.
    > >>
    > >>you can set the gif with client code, but in general animated gifs will not
    > >>run during a postback. the best solution is start the long running process
    > >>in a background thread, and poll for completion. google this newgroup for
    > >>processing message, and you shoudl find examples.
    > >>
    > >>-- bruce (sqlwork.com)
    > >>
    > >><> wrote in message
    > >>news:...
    > >>
    > >>>I am reposting hoping better luck :)
    > >>>
    > >>>I can't achieve this simple thing: I have an animated gif in an image
    > >>>control (ImageProgress1). The image visibility is set to false. I want
    > >>>that when the User click on a given button (ButtonSomeLongTask) to
    > >>>execute a long task Me.ImageProgress1 become visible until the task on
    > >>>the server is finished. I call the task this way:
    > >>>
    > >>> Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    > >>>e As System.EventArgs) Handles ButtonSomeLongTast.Click
    > >>> ExecuteLongTask() 'here there is a call to a web service
    > >>> End Sub
    > >>>
    > >>>Any *simple* example to do it?
    > >>>
    > >>>-Pam
    > >>>

    > >
    > >
    , Aug 17, 2006
    #5
  6. mc Guest

    Re: How to entertain the user

    I've just quickly knocked up a prototpye with an animated gif

    I have a page as follows

    [PAGE HEADER STUFF]
    ....
    <asp:Image ID="progressImage" ImageUrl="~/progBall.gif" runat="server"/>
    <asp:Button ID="DoLongTaskButton" runat="server"
    OnClick="LongTaskSimulation" Text="Do Long Task" />
    ....
    [PAGE FOOTER STUFF]

    and a C# code behind as follows

    [STANDARD USINGS]
    [CLASS DEFINITION]
    ....
    protected void Page_Load(object sender, EventArgs e)
    {
    ProgrssImage.Style.Add("display", "none");
    DoLongTaskButton.OnClientClick =
    "document."+progressImage.ClientID+".style.display = '';";
    }

    protected void LongTaskSimulation(object sender, EventArgs e)
    {
    System.Threading.Thread.Sleep(3000);
    }
    ....


    wrote:
    > hmmm, no it does not seem to work. If you have it working please let me
    > know.
    >
    > Perhaps the images must be animated manually by javascript.
    >
    > -p
    >
    > mc ha scritto:
    >
    >
    >>How About:-
    >>
    >>place the gif on the page and set it's style to "display:none" then in
    >>your code set the onClientClick to some Javascript which un-hides the
    >>image, this will then be visible to the user until the post back has
    >>been completed and the new page is sent out?
    >>
    >>never actually tried this myself but it seems to make sense in my head!
    >>
    >>Have you thought about Atlas? You can use an update progress control to
    >>display some custom text/graphic whilst the Ajax post back is completing.
    >>
    >>
    >> wrote:
    >>
    >>>I see :( Thanks bruce.
    >>>Apart animated gif, is there any simple solution I can use to entertain
    >>>the user during a long running task, possibly without spending a week
    >>>to implement it ? I have seen some of such nice animations, but I am
    >>>unsure about the technology they used.
    >>>
    >>>-Pam
    >>>
    >>>bruce barker (sqlwork.com) ha scritto:
    >>>
    >>>
    >>>
    >>>>this will not work. in the asp.net from processing model, a button click
    >>>>posts back, and the page is rebuilt and sent back to the browser. this means
    >>>>the brwser will not see the html to display the gif until all the server
    >>>>processing is done.
    >>>>
    >>>>you can set the gif with client code, but in general animated gifs will not
    >>>>run during a postback. the best solution is start the long running process
    >>>>in a background thread, and poll for completion. google this newgroup for
    >>>>processing message, and you shoudl find examples.
    >>>>
    >>>>-- bruce (sqlwork.com)
    >>>>
    >>>><> wrote in message
    >>>>news:...
    >>>>
    >>>>
    >>>>>I am reposting hoping better luck :)
    >>>>>
    >>>>>I can't achieve this simple thing: I have an animated gif in an image
    >>>>>control (ImageProgress1). The image visibility is set to false. I want
    >>>>>that when the User click on a given button (ButtonSomeLongTask) to
    >>>>>execute a long task Me.ImageProgress1 become visible until the task on
    >>>>>the server is finished. I call the task this way:
    >>>>>
    >>>>>Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    >>>>>e As System.EventArgs) Handles ButtonSomeLongTast.Click
    >>>>> ExecuteLongTask() 'here there is a call to a web service
    >>>>> End Sub
    >>>>>
    >>>>>Any *simple* example to do it?
    >>>>>
    >>>>>-Pam
    >>>>>
    >>>
    >>>

    >
    mc, Aug 17, 2006
    #6
  7. mc Guest

    Re: How to entertain the user

    I only tested it in Firefox, looks like if you want this to work
    universally your OnClientClick needs to read
    "document.getElementById('"+progressImage.ClientId+"').style.display = '';"

    mc wrote:
    > I've just quickly knocked up a prototpye with an animated gif
    >
    > I have a page as follows
    >
    > [PAGE HEADER STUFF]
    > ...
    > <asp:Image ID="progressImage" ImageUrl="~/progBall.gif" runat="server"/>
    > <asp:Button ID="DoLongTaskButton" runat="server"
    > OnClick="LongTaskSimulation" Text="Do Long Task" />
    > ...
    > [PAGE FOOTER STUFF]
    >
    > and a C# code behind as follows
    >
    > [STANDARD USINGS]
    > [CLASS DEFINITION]
    > ...
    > protected void Page_Load(object sender, EventArgs e)
    > {
    > ProgrssImage.Style.Add("display", "none");
    > DoLongTaskButton.OnClientClick =
    > "document."+progressImage.ClientID+".style.display = '';";
    > }
    >
    > protected void LongTaskSimulation(object sender, EventArgs e)
    > {
    > System.Threading.Thread.Sleep(3000);
    > }
    > ...
    >
    >
    > wrote:
    >
    >> hmmm, no it does not seem to work. If you have it working please let me
    >> know.
    >>
    >> Perhaps the images must be animated manually by javascript.
    >>
    >> -p
    >>
    >> mc ha scritto:
    >>
    >>
    >>> How About:-
    >>>
    >>> place the gif on the page and set it's style to "display:none" then in
    >>> your code set the onClientClick to some Javascript which un-hides the
    >>> image, this will then be visible to the user until the post back has
    >>> been completed and the new page is sent out?
    >>>
    >>> never actually tried this myself but it seems to make sense in my head!
    >>>
    >>> Have you thought about Atlas? You can use an update progress control to
    >>> display some custom text/graphic whilst the Ajax post back is
    >>> completing.
    >>>
    >>>
    >>> wrote:
    >>>
    >>>> I see :( Thanks bruce.
    >>>> Apart animated gif, is there any simple solution I can use to entertain
    >>>> the user during a long running task, possibly without spending a week
    >>>> to implement it ? I have seen some of such nice animations, but I am
    >>>> unsure about the technology they used.
    >>>>
    >>>> -Pam
    >>>>
    >>>> bruce barker (sqlwork.com) ha scritto:
    >>>>
    >>>>
    >>>>
    >>>>> this will not work. in the asp.net from processing model, a button
    >>>>> click
    >>>>> posts back, and the page is rebuilt and sent back to the browser.
    >>>>> this means
    >>>>> the brwser will not see the html to display the gif until all the
    >>>>> server
    >>>>> processing is done.
    >>>>>
    >>>>> you can set the gif with client code, but in general animated gifs
    >>>>> will not
    >>>>> run during a postback. the best solution is start the long running
    >>>>> process
    >>>>> in a background thread, and poll for completion. google this
    >>>>> newgroup for
    >>>>> processing message, and you shoudl find examples.
    >>>>>
    >>>>> -- bruce (sqlwork.com)
    >>>>>
    >>>>> <> wrote in message
    >>>>> news:...
    >>>>>
    >>>>>
    >>>>>> I am reposting hoping better luck :)
    >>>>>>
    >>>>>> I can't achieve this simple thing: I have an animated gif in an image
    >>>>>> control (ImageProgress1). The image visibility is set to false. I
    >>>>>> want
    >>>>>> that when the User click on a given button (ButtonSomeLongTask) to
    >>>>>> execute a long task Me.ImageProgress1 become visible until the
    >>>>>> task on
    >>>>>> the server is finished. I call the task this way:
    >>>>>>
    >>>>>> Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    >>>>>> e As System.EventArgs) Handles ButtonSomeLongTast.Click
    >>>>>> ExecuteLongTask() 'here there is a call to a web service
    >>>>>> End Sub
    >>>>>>
    >>>>>> Any *simple* example to do it?
    >>>>>>
    >>>>>> -Pam
    >>>>>>
    >>>>
    >>>>

    >>
    mc, Aug 17, 2006
    #7
  8. Guest

    Re: How to entertain the user

    Perhaps I have not explained well my problem. Looks like you are not
    leaving the page at all. The sleep should be put on another page to
    simulate the server processing:

    source page: button -> some post -> enable animation before leaving
    destination page: sleep a while + response write.

    during the sleep a while I would like to see some entertainment on the
    source page

    IE does not animate gif while leaving the page. That's the problem...
    If you do the sleep within your page there is no problem.

    -p

    mc ha scritto:

    > I only tested it in Firefox, looks like if you want this to work
    > universally your OnClientClick needs to read
    > "document.getElementById('"+progressImage.ClientId+"').style.display = '';"
    >
    > mc wrote:
    > > I've just quickly knocked up a prototpye with an animated gif
    > >
    > > I have a page as follows
    > >
    > > [PAGE HEADER STUFF]
    > > ...
    > > <asp:Image ID="progressImage" ImageUrl="~/progBall.gif" runat="server"/>
    > > <asp:Button ID="DoLongTaskButton" runat="server"
    > > OnClick="LongTaskSimulation" Text="Do Long Task" />
    > > ...
    > > [PAGE FOOTER STUFF]
    > >
    > > and a C# code behind as follows
    > >
    > > [STANDARD USINGS]
    > > [CLASS DEFINITION]
    > > ...
    > > protected void Page_Load(object sender, EventArgs e)
    > > {
    > > ProgrssImage.Style.Add("display", "none");
    > > DoLongTaskButton.OnClientClick =
    > > "document."+progressImage.ClientID+".style.display = '';";
    > > }
    > >
    > > protected void LongTaskSimulation(object sender, EventArgs e)
    > > {
    > > System.Threading.Thread.Sleep(3000);
    > > }
    > > ...
    > >
    > >
    > > wrote:
    > >
    > >> hmmm, no it does not seem to work. If you have it working please let me
    > >> know.
    > >>
    > >> Perhaps the images must be animated manually by javascript.
    > >>
    > >> -p
    > >>
    > >> mc ha scritto:
    > >>
    > >>
    > >>> How About:-
    > >>>
    > >>> place the gif on the page and set it's style to "display:none" then in
    > >>> your code set the onClientClick to some Javascript which un-hides the
    > >>> image, this will then be visible to the user until the post back has
    > >>> been completed and the new page is sent out?
    > >>>
    > >>> never actually tried this myself but it seems to make sense in my head!
    > >>>
    > >>> Have you thought about Atlas? You can use an update progress control to
    > >>> display some custom text/graphic whilst the Ajax post back is
    > >>> completing.
    > >>>
    > >>>
    > >>> wrote:
    > >>>
    > >>>> I see :( Thanks bruce.
    > >>>> Apart animated gif, is there any simple solution I can use to entertain
    > >>>> the user during a long running task, possibly without spending a week
    > >>>> to implement it ? I have seen some of such nice animations, but I am
    > >>>> unsure about the technology they used.
    > >>>>
    > >>>> -Pam
    > >>>>
    > >>>> bruce barker (sqlwork.com) ha scritto:
    > >>>>
    > >>>>
    > >>>>
    > >>>>> this will not work. in the asp.net from processing model, a button
    > >>>>> click
    > >>>>> posts back, and the page is rebuilt and sent back to the browser.
    > >>>>> this means
    > >>>>> the brwser will not see the html to display the gif until all the
    > >>>>> server
    > >>>>> processing is done.
    > >>>>>
    > >>>>> you can set the gif with client code, but in general animated gifs
    > >>>>> will not
    > >>>>> run during a postback. the best solution is start the long running
    > >>>>> process
    > >>>>> in a background thread, and poll for completion. google this
    > >>>>> newgroup for
    > >>>>> processing message, and you shoudl find examples.
    > >>>>>
    > >>>>> -- bruce (sqlwork.com)
    > >>>>>
    > >>>>> <> wrote in message
    > >>>>> news:...
    > >>>>>
    > >>>>>
    > >>>>>> I am reposting hoping better luck :)
    > >>>>>>
    > >>>>>> I can't achieve this simple thing: I have an animated gif in an image
    > >>>>>> control (ImageProgress1). The image visibility is set to false. I
    > >>>>>> want
    > >>>>>> that when the User click on a given button (ButtonSomeLongTask) to
    > >>>>>> execute a long task Me.ImageProgress1 become visible until the
    > >>>>>> task on
    > >>>>>> the server is finished. I call the task this way:
    > >>>>>>
    > >>>>>> Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    > >>>>>> e As System.EventArgs) Handles ButtonSomeLongTast.Click
    > >>>>>> ExecuteLongTask() 'here there is a call to a web service
    > >>>>>> End Sub
    > >>>>>>
    > >>>>>> Any *simple* example to do it?
    > >>>>>>
    > >>>>>> -Pam
    > >>>>>>
    > >>>>
    > >>>>
    > >>
    , Aug 17, 2006
    #8
  9. mc Guest

    Re: How to entertain the user

    I do not load a separate page because this is not necessary, I do
    however post back to the server (just look for the standard page loading
    gif in your chosen browser), the Sleep is being done on the server all
    you need to do is replace the function in the asp page
    "LongTaskSimulation" with your long task.

    Once the task is complete the server will return control to the page
    which can be updated with info from the longTask.

    Alternatively if you must navigate away to another page place a
    Response.Redirect after your long task code and you will then progress
    to the next page?

    This conforms to the way pages should be developed with the event
    processing for the buttons on within the same "module" as the buttons

    If this still confuses I suggest you have a search for info on the
    ASP.NET page life cycle.

    wrote:
    > Perhaps I have not explained well my problem. Looks like you are not
    > leaving the page at all. The sleep should be put on another page to
    > simulate the server processing:
    >
    > source page: button -> some post -> enable animation before leaving
    > destination page: sleep a while + response write.
    >
    > during the sleep a while I would like to see some entertainment on the
    > source page
    >
    > IE does not animate gif while leaving the page. That's the problem...
    > If you do the sleep within your page there is no problem.
    >
    > -p
    >
    > mc ha scritto:
    >
    >
    >>I only tested it in Firefox, looks like if you want this to work
    >>universally your OnClientClick needs to read
    >>"document.getElementById('"+progressImage.ClientId+"').style.display = '';"
    >>
    >>mc wrote:
    >>
    >>>I've just quickly knocked up a prototpye with an animated gif
    >>>
    >>>I have a page as follows
    >>>
    >>>[PAGE HEADER STUFF]
    >>>...
    >>><asp:Image ID="progressImage" ImageUrl="~/progBall.gif" runat="server"/>
    >>><asp:Button ID="DoLongTaskButton" runat="server"
    >>>OnClick="LongTaskSimulation" Text="Do Long Task" />
    >>>...
    >>>[PAGE FOOTER STUFF]
    >>>
    >>>and a C# code behind as follows
    >>>
    >>>[STANDARD USINGS]
    >>>[CLASS DEFINITION]
    >>>...
    >>>protected void Page_Load(object sender, EventArgs e)
    >>>{
    >>> ProgrssImage.Style.Add("display", "none");
    >>> DoLongTaskButton.OnClientClick =
    >>>"document."+progressImage.ClientID+".style.display = '';";
    >>>}
    >>>
    >>>protected void LongTaskSimulation(object sender, EventArgs e)
    >>>{
    >>> System.Threading.Thread.Sleep(3000);
    >>>}
    >>>...
    >>>
    >>>
    >>> wrote:
    >>>
    >>>
    >>>>hmmm, no it does not seem to work. If you have it working please let me
    >>>>know.
    >>>>
    >>>>Perhaps the images must be animated manually by javascript.
    >>>>
    >>>>-p
    >>>>
    >>>>mc ha scritto:
    >>>>
    >>>>
    >>>>
    >>>>>How About:-
    >>>>>
    >>>>>place the gif on the page and set it's style to "display:none" then in
    >>>>>your code set the onClientClick to some Javascript which un-hides the
    >>>>>image, this will then be visible to the user until the post back has
    >>>>>been completed and the new page is sent out?
    >>>>>
    >>>>>never actually tried this myself but it seems to make sense in my head!
    >>>>>
    >>>>>Have you thought about Atlas? You can use an update progress control to
    >>>>>display some custom text/graphic whilst the Ajax post back is
    >>>>>completing.
    >>>>>
    >>>>>
    >>>>> wrote:
    >>>>>
    >>>>>
    >>>>>>I see :( Thanks bruce.
    >>>>>>Apart animated gif, is there any simple solution I can use to entertain
    >>>>>>the user during a long running task, possibly without spending a week
    >>>>>>to implement it ? I have seen some of such nice animations, but I am
    >>>>>>unsure about the technology they used.
    >>>>>>
    >>>>>>-Pam
    >>>>>>
    >>>>>>bruce barker (sqlwork.com) ha scritto:
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>>this will not work. in the asp.net from processing model, a button
    >>>>>>>click
    >>>>>>>posts back, and the page is rebuilt and sent back to the browser.
    >>>>>>>this means
    >>>>>>>the brwser will not see the html to display the gif until all the
    >>>>>>>server
    >>>>>>>processing is done.
    >>>>>>>
    >>>>>>>you can set the gif with client code, but in general animated gifs
    >>>>>>>will not
    >>>>>>>run during a postback. the best solution is start the long running
    >>>>>>>process
    >>>>>>>in a background thread, and poll for completion. google this
    >>>>>>>newgroup for
    >>>>>>>processing message, and you shoudl find examples.
    >>>>>>>
    >>>>>>>-- bruce (sqlwork.com)
    >>>>>>>
    >>>>>>><> wrote in message
    >>>>>>>news:...
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>>I am reposting hoping better luck :)
    >>>>>>>>
    >>>>>>>>I can't achieve this simple thing: I have an animated gif in an image
    >>>>>>>>control (ImageProgress1). The image visibility is set to false. I
    >>>>>>>>want
    >>>>>>>>that when the User click on a given button (ButtonSomeLongTask) to
    >>>>>>>>execute a long task Me.ImageProgress1 become visible until the
    >>>>>>>>task on
    >>>>>>>>the server is finished. I call the task this way:
    >>>>>>>>
    >>>>>>>>Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal
    >>>>>>>>e As System.EventArgs) Handles ButtonSomeLongTast.Click
    >>>>>>>> ExecuteLongTask() 'here there is a call to a web service
    >>>>>>>> End Sub
    >>>>>>>>
    >>>>>>>>Any *simple* example to do it?
    >>>>>>>>
    >>>>>>>>-Pam
    >>>>>>>>
    >>>>>>
    >>>>>>

    >
    mc, Aug 17, 2006
    #9
    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. hb
    Replies:
    6
    Views:
    9,118
  2. mike
    Replies:
    6
    Views:
    854
    John C. Bollinger
    Aug 9, 2004
  3. Gary J
    Replies:
    19
    Views:
    39,265
    Chris Uppal
    Aug 31, 2004
  4. focode
    Replies:
    1
    Views:
    1,836
    John B. Matthews
    Sep 8, 2009
  5. Uros
    Replies:
    2
    Views:
    321
Loading...

Share This Page