473,412 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Form behavior in ASP.net

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
Nov 17 '05 #1
2 3237
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/.../features/ches
ter/

-----Original Message-----
I am using code behind in visual studio to build all of mynew web forms. I am attempting to build a page that willallow a user to enter a computer name in a text field,
then click a submit button. When the form is submitted, Iam performing a series of checks on the computer that cantake 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 twolables and a .gif file on it. In page2's codebehind on
the form_load event I have a response.redirect to page3 todisplay 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 pagewith 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) thendisplays 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
.

Nov 17 '05 #2
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" <sp*********@nc.rr.com> wrote in message
news:07****************************@phx.gbl...
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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
12
by: CJ | last post by:
Why won't this work? I am passing the name of the form (I have two that use this validation script) but I keep getting an error. Error reads: "document.which_form.name is null or not an object" ...
10
by: Andres Eduardo Hernando | last post by:
Hi, I'm not entirely sure this is the right group to ask this question, but I saw a similar one above, and the group's charter is not clear enough about it, so, here I go: ;) What is the...
4
by: Billy Boone | last post by:
I have a web form that allows the user to enter several pieces of information. They can then click to see the results (which takes them to a report form). From this form, if the user clicks the...
1
by: Howard Jess | last post by:
Apparently, form elements of type <input type="image" src="...> are not included in the form's elements collection. I don't understand why not; according to DOM2, all form control elements...
3
by: ThunderMusic | last post by:
Hi, I'm trying to have a MSN Messenger like form/app closing behavior. When I click on the X button, I only want the form to disappear and when I double-click on the notify icon or right-click...
4
by: dbuchanan | last post by:
Is the following behavior normal? Both the 'Protected sub' in the inherited form and the 'Private Shadows sub' in the derived form fires. My interpretation of MSDN help on the topic "Shadows"...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
1
by: Jason Richmeier | last post by:
I am experiencing some unexpected behavior with the Form Load event in a Windows application. Hopefully, someone can explain why this behavior is occurring. In my application, I have a form...
9
by: dhtml | last post by:
I have written an article "Unsafe Names for HTML Form Controls". <URL: http://jibbering.com/faq/names/ > I would appreciate any reviews, technical or otherwise. Garrett --...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.