Showing a loading screen

Discussion in 'ASP .Net' started by graphicsxp, Jun 3, 2006.

  1. graphicsxp

    graphicsxp Guest

    Hi,
    I have can upload a file to the server from my aspx page using the
    uploadfile control. When the user click on submit I'd like to show an
    animated gif while the file is being uploaded. But how can I know when
    the file was uploaded and I can stop showing the animation ?

    The way I've done it:
    I have a multiview control.
    view1 -> upload interface
    view2 -> animation while uploading
    view3 -> feedback to the user saying the upload was successfull.

    First probem: I can switch to view2 when the user clicked submit but
    then I need to upload the file. I've tried in the activeviewchanged
    event but then the view is only displayed once the file has been
    uploaded...

    Second problem: How can I know when to switch from view2 to view3....

    Can you help? I'm struggling with this.:(

    thank you
    graphicsxp, Jun 3, 2006
    #1
    1. Advertising

  2. in genreral this will be difficult to do without an active/x control. a post
    inculding a file, is treated by the browser as a page request. it will not
    display a response until the upload finishes. you can start an animation
    (make an invisible gif visibale), but genrally the browser shuts down the
    animation thread while posting. you can have better luck with frames, by
    posting to a hidden frame.

    -- bruce (sqlwork.com)



    "graphicsxp" <> wrote in message
    news:...
    > Hi,
    > I have can upload a file to the server from my aspx page using the
    > uploadfile control. When the user click on submit I'd like to show an
    > animated gif while the file is being uploaded. But how can I know when
    > the file was uploaded and I can stop showing the animation ?
    >
    > The way I've done it:
    > I have a multiview control.
    > view1 -> upload interface
    > view2 -> animation while uploading
    > view3 -> feedback to the user saying the upload was successfull.
    >
    > First probem: I can switch to view2 when the user clicked submit but
    > then I need to upload the file. I've tried in the activeviewchanged
    > event but then the view is only displayed once the file has been
    > uploaded...
    >
    > Second problem: How can I know when to switch from view2 to view3....
    >
    > Can you help? I'm struggling with this.:(
    >
    > thank you
    >
    bruce barker \(sqlwork.com\), Jun 3, 2006
    #2
    1. Advertising

  3. graphicsxp

    graphicsxp Guest

    Thanks for replying. This is not very encouraging thought :(
    I hope I'm going to find a better solution than hidden frames !
    bruce barker (sqlwork.com) a écrit :

    > in genreral this will be difficult to do without an active/x control. a post
    > inculding a file, is treated by the browser as a page request. it will not
    > display a response until the upload finishes. you can start an animation
    > (make an invisible gif visibale), but genrally the browser shuts down the
    > animation thread while posting. you can have better luck with frames, by
    > posting to a hidden frame.
    >
    > -- bruce (sqlwork.com)
    >
    >
    >
    > "graphicsxp" <> wrote in message
    > news:...
    > > Hi,
    > > I have can upload a file to the server from my aspx page using the
    > > uploadfile control. When the user click on submit I'd like to show an
    > > animated gif while the file is being uploaded. But how can I know when
    > > the file was uploaded and I can stop showing the animation ?
    > >
    > > The way I've done it:
    > > I have a multiview control.
    > > view1 -> upload interface
    > > view2 -> animation while uploading
    > > view3 -> feedback to the user saying the upload was successfull.
    > >
    > > First probem: I can switch to view2 when the user clicked submit but
    > > then I need to upload the file. I've tried in the activeviewchanged
    > > event but then the view is only displayed once the file has been
    > > uploaded...
    > >
    > > Second problem: How can I know when to switch from view2 to view3....
    > >
    > > Can you help? I'm struggling with this.:(
    > >
    > > thank you
    > >
    graphicsxp, Jun 3, 2006
    #3
  4. graphicsxp

    Shawn Guest

    You should be able to achieve what you want using threading. Check out
    http://www.ftponline.com/vsm/2002_11/magazine/features/chester/




    "graphicsxp" <> wrote in message
    news:...
    Thanks for replying. This is not very encouraging thought :(
    I hope I'm going to find a better solution than hidden frames !
    bruce barker (sqlwork.com) a écrit :

    > in genreral this will be difficult to do without an active/x control. a

    post
    > inculding a file, is treated by the browser as a page request. it will not
    > display a response until the upload finishes. you can start an animation
    > (make an invisible gif visibale), but genrally the browser shuts down the
    > animation thread while posting. you can have better luck with frames, by
    > posting to a hidden frame.
    >
    > -- bruce (sqlwork.com)
    >
    >
    >
    > "graphicsxp" <> wrote in message
    > news:...
    > > Hi,
    > > I have can upload a file to the server from my aspx page using the
    > > uploadfile control. When the user click on submit I'd like to show an
    > > animated gif while the file is being uploaded. But how can I know when
    > > the file was uploaded and I can stop showing the animation ?
    > >
    > > The way I've done it:
    > > I have a multiview control.
    > > view1 -> upload interface
    > > view2 -> animation while uploading
    > > view3 -> feedback to the user saying the upload was successfull.
    > >
    > > First probem: I can switch to view2 when the user clicked submit but
    > > then I need to upload the file. I've tried in the activeviewchanged
    > > event but then the view is only displayed once the file has been
    > > uploaded...
    > >
    > > Second problem: How can I know when to switch from view2 to view3....
    > >
    > > Can you help? I'm struggling with this.:(
    > >
    > > thank you
    > >
    Shawn, Jun 4, 2006
    #4
  5. graphicsxp

    graphicsxp Guest

    Hi Shawn,
    Thanks for the link, it is a very interesting approach.
    For now I've solved my problem using this:
    http://www.codeproject.com/aspnet/PleaseWaitButton.asp
    as I don't care about giving an exact feedback on the upload
    progression. But anyway I'll keep the multithreading idea in mind for
    other stuff!
    Thanks.

    Shawn a écrit :

    > You should be able to achieve what you want using threading. Check out
    > http://www.ftponline.com/vsm/2002_11/magazine/features/chester/
    >
    >
    >
    >
    > "graphicsxp" <> wrote in message
    > news:...
    > Thanks for replying. This is not very encouraging thought :(
    > I hope I'm going to find a better solution than hidden frames !
    > bruce barker (sqlwork.com) a écrit :
    >
    > > in genreral this will be difficult to do without an active/x control. a

    > post
    > > inculding a file, is treated by the browser as a page request. it will not
    > > display a response until the upload finishes. you can start an animation
    > > (make an invisible gif visibale), but genrally the browser shuts down the
    > > animation thread while posting. you can have better luck with frames, by
    > > posting to a hidden frame.
    > >
    > > -- bruce (sqlwork.com)
    > >
    > >
    > >
    > > "graphicsxp" <> wrote in message
    > > news:...
    > > > Hi,
    > > > I have can upload a file to the server from my aspx page using the
    > > > uploadfile control. When the user click on submit I'd like to show an
    > > > animated gif while the file is being uploaded. But how can I know when
    > > > the file was uploaded and I can stop showing the animation ?
    > > >
    > > > The way I've done it:
    > > > I have a multiview control.
    > > > view1 -> upload interface
    > > > view2 -> animation while uploading
    > > > view3 -> feedback to the user saying the upload was successfull.
    > > >
    > > > First probem: I can switch to view2 when the user clicked submit but
    > > > then I need to upload the file. I've tried in the activeviewchanged
    > > > event but then the view is only displayed once the file has been
    > > > uploaded...
    > > >
    > > > Second problem: How can I know when to switch from view2 to view3....
    > > >
    > > > Can you help? I'm struggling with this.:(
    > > >
    > > > thank you
    > > >
    graphicsxp, Jun 4, 2006
    #5
  6. graphicsxp

    Ciaran Guest

    try using atlas.

    Ciaran

    "graphicsxp" <> wrote in message
    news:...
    > Hi,
    > I have can upload a file to the server from my aspx page using the
    > uploadfile control. When the user click on submit I'd like to show an
    > animated gif while the file is being uploaded. But how can I know when
    > the file was uploaded and I can stop showing the animation ?
    >
    > The way I've done it:
    > I have a multiview control.
    > view1 -> upload interface
    > view2 -> animation while uploading
    > view3 -> feedback to the user saying the upload was successfull.
    >
    > First probem: I can switch to view2 when the user clicked submit but
    > then I need to upload the file. I've tried in the activeviewchanged
    > event but then the view is only displayed once the file has been
    > uploaded...
    >
    > Second problem: How can I know when to switch from view2 to view3....
    >
    > Can you help? I'm struggling with this.:(
    >
    > thank you
    >
    Ciaran, Jun 6, 2006
    #6
    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. Russell
    Replies:
    1
    Views:
    366
    Steve C. Orr [MVP, MCSD]
    Jan 21, 2004
  2. Ray Booysen
    Replies:
    2
    Views:
    633
    Ray Booysen
    Mar 28, 2006
  3. Pat
    Replies:
    5
    Views:
    531
  4. owl
    Replies:
    2
    Views:
    864
  5. Idelso Quintero

    dynamic combo box not showing on the screen

    Idelso Quintero, Oct 4, 2004, in forum: Javascript
    Replies:
    1
    Views:
    89
    Robert
    Oct 5, 2004
Loading...

Share This Page