Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Loop not executing

Loop not executing

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiohelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dhyanga
    wrote on last edited by
    #1

    Hi, I was using visual studio 2005 before. Now I am using visual studio 2008. I got some problem with the loop execution. Well the project with the loop statements was working fine before but now in visual studio 2008, loop is not executing. I have a loop on a button click and only the loop is not even working. The piece of code i have on my button click is

    protected void btnArchieve_Click(object sender, EventArgs e)
    {

            for (int i = 0; i < gViewIndividualNames.Rows.Count; i++)
            {
              
    
            }
    
    
        }
    

    I put the breakpoints in all the lines but I even checked my count value. Its 2 but still this loop is executing only once. Any ideas?

    suchita

    P D 2 Replies Last reply
    0
    • D Dhyanga

      Hi, I was using visual studio 2005 before. Now I am using visual studio 2008. I got some problem with the loop execution. Well the project with the loop statements was working fine before but now in visual studio 2008, loop is not executing. I have a loop on a button click and only the loop is not even working. The piece of code i have on my button click is

      protected void btnArchieve_Click(object sender, EventArgs e)
      {

              for (int i = 0; i < gViewIndividualNames.Rows.Count; i++)
              {
                
      
              }
      
      
          }
      

      I put the breakpoints in all the lines but I even checked my count value. Its 2 but still this loop is executing only once. Any ideas?

      suchita

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Without seeing what's in the for loop itself, no. If, however, there's a line in there that's incrementing i (e.g. i++), then that would explain it. Merely changing from VS2005 to VS2008 does not, by itself, change the fundamental nature of program applications. If I were you, I'd put a local watch on i and see what's happening to it as you step through the loop.

      Forgive your enemies - it messes with their heads

      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

      D 1 Reply Last reply
      0
      • P Pete OHanlon

        Without seeing what's in the for loop itself, no. If, however, there's a line in there that's incrementing i (e.g. i++), then that would explain it. Merely changing from VS2005 to VS2008 does not, by itself, change the fundamental nature of program applications. If I were you, I'd put a local watch on i and see what's happening to it as you step through the loop.

        Forgive your enemies - it messes with their heads

        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

        D Offline
        D Offline
        Dhyanga
        wrote on last edited by
        #3

        thanks for the reply... now again the same code is working...

        suchita

        1 Reply Last reply
        0
        • D Dhyanga

          Hi, I was using visual studio 2005 before. Now I am using visual studio 2008. I got some problem with the loop execution. Well the project with the loop statements was working fine before but now in visual studio 2008, loop is not executing. I have a loop on a button click and only the loop is not even working. The piece of code i have on my button click is

          protected void btnArchieve_Click(object sender, EventArgs e)
          {

                  for (int i = 0; i < gViewIndividualNames.Rows.Count; i++)
                  {
                    
          
                  }
          
          
              }
          

          I put the breakpoints in all the lines but I even checked my count value. Its 2 but still this loop is executing only once. Any ideas?

          suchita

          D Offline
          D Offline
          Dalek Dave
          wrote on last edited by
          #4

          Dependant on the number of rows, there is nothing obviously wrong here.

          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups