How to display a picture while a long process is carried out ?

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

  1. Guest

    I have an animated gif in an image control:
    Me.ImageProgress1.Visible = False

    I want that when the User click on a given button 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 ButtonSomeLongTast_Click(ByVal sender As Object, ByVal
    e As System.EventArgs) Handles ButtonSomeLongTast.Click

    ExecuteLongTask()

    End Sub

    I think I am dumb as I can't figure out how to do this simple thing!
    Thanks for any help!

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

  2. Ray Booysen Guest

    Re: How to display a picture while a long process is carried out?

    What you can also do is add some javascipt to the onclick() method of
    the button to change the visibility of the image.

    wrote:
    > I have an animated gif in an image control:
    > Me.ImageProgress1.Visible = False
    >
    > I want that when the User click on a given button 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 ButtonSomeLongTast_Click(ByVal sender As Object, ByVal
    > e As System.EventArgs) Handles ButtonSomeLongTast.Click
    >
    > ExecuteLongTask()
    >
    > End Sub
    >
    > I think I am dumb as I can't figure out how to do this simple thing!
    > Thanks for any help!
    >
    > -Pam
    >
     
    Ray Booysen, Aug 15, 2006
    #2
    1. Advertising

  3. Guest

    I tried but it does not work. See a blank page.
    Can anyone show a simple working example?

    -pam

    Ray Booysen ha scritto:

    > What you can also do is add some javascipt to the onclick() method of
    > the button to change the visibility of the image.
    >
    > wrote:
    > > I have an animated gif in an image control:
    > > Me.ImageProgress1.Visible = False
    > >
    > > I want that when the User click on a given button 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 ButtonSomeLongTast_Click(ByVal sender As Object, ByVal
    > > e As System.EventArgs) Handles ButtonSomeLongTast.Click
    > >
    > > ExecuteLongTask()
    > >
    > > End Sub
    > >
    > > I think I am dumb as I can't figure out how to do this simple thing!
    > > Thanks for any help!
    > >
    > > -Pam
    > >
     
    , Aug 15, 2006
    #3
  4. Ray Booysen Guest

    Re: How to display a picture while a long process is carried out?

    How about some more of the code you're writing?

    wrote:
    > I tried but it does not work. See a blank page.
    > Can anyone show a simple working example?
    >
    > -pam
    >
    > Ray Booysen ha scritto:
    >
    >> What you can also do is add some javascipt to the onclick() method of
    >> the button to change the visibility of the image.
    >>
    >> wrote:
    >>> I have an animated gif in an image control:
    >>> Me.ImageProgress1.Visible = False
    >>>
    >>> I want that when the User click on a given button 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 ButtonSomeLongTast_Click(ByVal sender As Object, ByVal
    >>> e As System.EventArgs) Handles ButtonSomeLongTast.Click
    >>>
    >>> ExecuteLongTask()
    >>>
    >>> End Sub
    >>>
    >>> I think I am dumb as I can't figure out how to do this simple thing!
    >>> Thanks for any help!
    >>>
    >>> -Pam
    >>>

    >
     
    Ray Booysen, Aug 15, 2006
    #4
  5. Guest

    Hi Ray, Do you know how to do it?

    I have

    Protected Sub ButtonSomeLongTast_Click(ByVal sender As Object, ByVal
    e As System.EventArgs) Handles ButtonSomeLongTast.Click

    ExecuteLongTask()

    End Sub

    then I grabbed this from internet:

    <script language="javascript">
    function toggle(e) {
    if (e.style.display == "none") {
    e.style.display = "";
    } else {
    e.style.display = "none";
    }
    }
    </script>

    I placed after
    <title></title>

    Also I placed
    <body onload="toggle(progress)">

    Then under onclick() event of button1 I placed: = "toggle(progress)"

    where progress is a DIV which contains the image with the GIF

    <div id="progress"> MyAnimatedImage </div>


    No luck!!
    I am a beginner and I am probably missing something basic.
    Some simple working example in code would be great.


    -Pam



    Ray Booysen ha scritto:

    > How about some more of the code you're writing?
    >
    > wrote:
    > > I tried but it does not work. See a blank page.
    > > Can anyone show a simple working example?
    > >
    > > -pam
    > >
    > > Ray Booysen ha scritto:
    > >
    > >> What you can also do is add some javascipt to the onclick() method of
    > >> the button to change the visibility of the image.
    > >>
    > >> wrote:
    > >>> I have an animated gif in an image control:
    > >>> Me.ImageProgress1.Visible = False
    > >>>
    > >>> I want that when the User click on a given button 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 ButtonSomeLongTast_Click(ByVal sender As Object, ByVal
    > >>> e As System.EventArgs) Handles ButtonSomeLongTast.Click
    > >>>
    > >>> ExecuteLongTask()
    > >>>
    > >>> End Sub
    > >>>
    > >>> I think I am dumb as I can't figure out how to do this simple thing!
    > >>> Thanks for any help!
    > >>>
    > >>> -Pam
    > >>>

    > >
     
    , Aug 15, 2006
    #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. rtm
    Replies:
    0
    Views:
    808
  2. Replies:
    18
    Views:
    621
    Ioannis Vranos
    Mar 6, 2005
  3. Moss
    Replies:
    1
    Views:
    288
  4. lmttag
    Replies:
    14
    Views:
    1,841
  5. Mufasa
    Replies:
    6
    Views:
    898
    Scott M.
    Jul 27, 2007
Loading...

Share This Page