Form behavior in ASP.net

Discussion in 'ASP .Net' started by Scott, Jun 26, 2003.

  1. Scott

    Scott Guest

    I am using code behind in visual studio to build all of my
    new web forms. I am attempting to build a page that will
    allow a user to enter a computer name in a text field,
    then click a submit button. When the form is submitted, I
    am performing a series of checks on the computer that can
    take up to 20 seconds. I would like to display to the
    user an intermediate page that will show an animated gif
    and tell them to wait.

    I have three web forms all built in vs.net using code-
    behind:
    Page1 - Page that allows user to enter pcname
    Page2 - Page that displays animated gif
    Page3 - Page that gives user results.

    In my code behind in page1, on the submit button click
    event, I have a response.redirect to page2. Page2 has two
    lables and a .gif file on it. In page2's codebehind on
    the form_load event I have a response.redirect to page3 to
    display the results to the user.

    The expected behavior is that once you fill out the text
    box and click submit, you would be redirected to the page
    with the animated gif, then once again redirected to the
    results page. What happens is this:

    When a user enters the pcname and clicks submit, the
    browser clocks for a 10-20 seconds(processing page3) then
    displays page3. I never see page2.

    How can I get this intermediate page to display to the
    user while they are waiting for all of the processes on
    page3 to finish in vs.net?

    thanks
    Scott, Jun 26, 2003
    #1
    1. Advertising

  2. Scott

    Matt Hawley Guest

    Check out this article on Multi-Threading and ASP.NET.
    It describes how you can accomplish this "progress bar"
    style.

    http://www.fawcette.com/vsm/2002_11/magazine/features/ches
    ter/


    >-----Original Message-----
    >I am using code behind in visual studio to build all of

    my
    >new web forms. I am attempting to build a page that

    will
    >allow a user to enter a computer name in a text field,
    >then click a submit button. When the form is submitted,

    I
    >am performing a series of checks on the computer that

    can
    >take up to 20 seconds. I would like to display to the
    >user an intermediate page that will show an animated gif
    >and tell them to wait.
    >
    >I have three web forms all built in vs.net using code-
    >behind:
    >Page1 - Page that allows user to enter pcname
    >Page2 - Page that displays animated gif
    >Page3 - Page that gives user results.
    >
    >In my code behind in page1, on the submit button click
    >event, I have a response.redirect to page2. Page2 has

    two
    >lables and a .gif file on it. In page2's codebehind on
    >the form_load event I have a response.redirect to page3

    to
    >display the results to the user.
    >
    >The expected behavior is that once you fill out the text
    >box and click submit, you would be redirected to the

    page
    >with the animated gif, then once again redirected to the
    >results page. What happens is this:
    >
    >When a user enters the pcname and clicks submit, the
    >browser clocks for a 10-20 seconds(processing page3)

    then
    >displays page3. I never see page2.
    >
    >How can I get this intermediate page to display to the
    >user while they are waiting for all of the processes on
    >page3 to finish in vs.net?
    >
    >thanks
    >.
    >
    Matt Hawley, Jun 26, 2003
    #2
    1. Advertising

  3. Scott

    bruce barker Guest

    if you do response.Redirect, then a redirect command is sent to the browser
    instead of the page contents,

    page 1 submits
    the reponse of the submit is a redirect to page 2
    the browsers requests page 2, but the response is a redirect page 3
    the browser request page 3 (which takes a while)
    the browser loads page 3

    if you want page 2 to display, it can not use a redirect, but must use
    javascript or a meta tag to do the submit. to display an image you must wait
    until the image has been display as a submit will stop loading. also
    animated gifs will not run during a post.

    the most common solution is to have page 2 poll (thru the refresh meta tag)
    for the long operation to complete, and only redirect once its done.



    "Scott" <> wrote in message
    news:07b201c33bd7$8120be40$...
    > I am using code behind in visual studio to build all of my
    > new web forms. I am attempting to build a page that will
    > allow a user to enter a computer name in a text field,
    > then click a submit button. When the form is submitted, I
    > am performing a series of checks on the computer that can
    > take up to 20 seconds. I would like to display to the
    > user an intermediate page that will show an animated gif
    > and tell them to wait.
    >
    > I have three web forms all built in vs.net using code-
    > behind:
    > Page1 - Page that allows user to enter pcname
    > Page2 - Page that displays animated gif
    > Page3 - Page that gives user results.
    >
    > In my code behind in page1, on the submit button click
    > event, I have a response.redirect to page2. Page2 has two
    > lables and a .gif file on it. In page2's codebehind on
    > the form_load event I have a response.redirect to page3 to
    > display the results to the user.
    >
    > The expected behavior is that once you fill out the text
    > box and click submit, you would be redirected to the page
    > with the animated gif, then once again redirected to the
    > results page. What happens is this:
    >
    > When a user enters the pcname and clicks submit, the
    > browser clocks for a 10-20 seconds(processing page3) then
    > displays page3. I never see page2.
    >
    > How can I get this intermediate page to display to the
    > user while they are waiting for all of the processes on
    > page3 to finish in vs.net?
    >
    > thanks
    bruce barker, Jun 26, 2003
    #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. =?Utf-8?B?UWFqdXNzaQ==?=

    How to create a web form like MS access form using asp.net??

    =?Utf-8?B?UWFqdXNzaQ==?=, Dec 27, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    731
    =?Utf-8?B?UWFqdXNzaQ==?=
    Dec 27, 2004
  2. Li Zhang
    Replies:
    4
    Views:
    6,041
    softip
    Feb 27, 2009
  3. Mantorok Redgormor
    Replies:
    70
    Views:
    1,724
    Dan Pop
    Feb 17, 2004
  4. rob c
    Replies:
    4
    Views:
    305
    McKirahan
    Dec 30, 2005
  5. jmp
    Replies:
    6
    Views:
    173
    Dag Sunde
    Jun 8, 2006
Loading...

Share This Page