473,583 Members | 3,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

for loop not working, page hangs up.

20 New Member

I have two asp pages. when both contain lots of coding, loops etc.

if i run the first page that contain for loop for creating array of textboxes,
then this page run successfully.

but if i include this first page in the second page using <#include.... .> then the for loop is not working n page hangs up.

Plz tell me what is the reason.n any solution if any.

thanks in advance.
this is urgent.
May 24 '07 #1
2 1448
3,406 Recognized Expert Specialist
Urgent, huh?

Well it sounds like the loop isn't advancing. There are lots of reasons why a loop might not advance, the most likely is that there is an error that is negating the advancing mechanism. An error would normally cause the page to stop, but if you use an "on error" line that may keep the loop cycling continuously.

A second reason the loop may not advance is if you re-used a variable between the two pages and as the variable is called, it cancels the loop's advance.

So I suggest trying two things: first comment out your error handlers. (this might point out the problem by itself) Second, put in a line that displays the loop index each time the loop executes (this just lets you observe the looping, allows you to verify that it goes correctly):
Expand|Select|Wrap|Line Numbers
  1. for x = 1 to 30
  2.    response.write "<!-- x: " & x & " -->" & vbNewLine
  3. next
May 24 '07 #2
Dipti Singh
20 New Member
Thanks a lot
now it is working by adding 'on error....'
this is a live site work, that is y i was in hurry.......
May 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Marty | last post by:
I can navigate all over my site when there is no DB involved, but as soon as I hit the database, the page hangs and times out. Since the page does not change, the trace debugging does not tell me what is going on. In fact, when I step through the routines, all database routines end nicely. My connections are closed, and I'm not caught in...
by: Brad Quinn | last post by:
It appears that IIS hangs the first time two requests are made for same page in quick succession. Although it may very well be something else I'm doing wrong. I have a page (ViewDocument.aspx) that dynamically generates one or more image tags. The source attribute of the image tag is another page (ViewImage.aspx) that simply writes the...
by: happyinst | last post by:
I have recently added some code to a web application and now I find it hanging after I do about 2 or 3 postbacks within the application. It hangs after doing different things (I cannot find anything in common) and when I run in Debug mode, it doesn't even appear to be within my code when it hangs (I put breakpoints all over the place and it...
by: mccoyn | last post by:
When I have a long process to run I can create a new thread to run it and create a modal dialog on my GUI thread. The modal dialog prevents any messages (like button clicks) from working on my main Form. It also provides a message loop, which allows paint messages and calls to the Control::Invoke function to run. I can use these to...
by: IdleBrain | last post by:
Hello all, The sleep() method hangs up the application and does not respond to events. So, I wrote a small delay loop that will allow the application to respond to events. 'Use Delay(500) to delay the application for 500ms. Public blnSleepTimeExpired As Boolean Public Sub Delay(ByVal intSleepTimems As Integer)
by: sp | last post by:
The application is written in Visual Basic / .NET and working without problems under Windows XP, Windows 2000, Windows 2003 but it isn't working under Windows ME and Windows 98 - the computer hangs. After computers hangs you can move mouse but can not press any key. Alt - Ctrl- Del isn’t working so you have to reset the computer by pressing...
by: mrjoka | last post by:
hi experts, i'm developing a page in ASP but i'm doing also some javascript insode the page. i'm creating a frame and i want to loop this frame with a duplicateloop function so the form will be duplicate so many time, also i'm using a removeloop if the client want to remove the frame, in the html of the page i'm creating a table and i'm calling...
by: d3vkit | last post by:
Okay so I can NOT get my while loop to work. It's the most confusing thing I've ever come across. It was working fine and then suddenly, nothing. No error. The page just dies. I am using PHP5 with mysql. Same problem in Fx 2.0 and IE 7. I have the query sort of spread out across three pages to make it easier for me to generate it; I have a...
by: Whizzo | last post by:
Hi all; This is driving me up the wall! A few months ago the Remote Web Workplace failed to work on a pretty much fresh install of SBS 2003. I tried everything in the Microsoft rulebook to get it working but instead OWA started playing up. Forms-based authentication stopped working, then it started coming up with Page Not Found errors, but...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.