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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Page_Load not fired in my .aspx code-behind

Page_Load not fired in my .aspx code-behind

Scheduled Pinned Locked Moved ASP.NET
debuggingcsharphelpquestion
5 Posts 2 Posters 2 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.
  • I Offline
    I Offline
    imnotso
    wrote on last edited by
    #1

    Is the following scenario even possible as this is what 'appears' to be happening. I have an .aspx page with a .ascx control. I have a breakpoint set on the the page_load of the .aspx page. As I debug the code stops at the OnInit event, continues to the InitializeComponent, then the page_load of the .ascx control, then that's it, the page displays... It misses out the page_load for the actual .aspx page (I've set breakpoints). I have some code in there that needs executing so the page isn't displaying corrctly. Does the code think 'I've done a page_load, that's me done, I'll render now' ?? This project was VS2003 and has just been converted by VS2005 when loading... Are things done so differently in .NET2 regarding page_loads? Any help appreciated.. Harvey

    S 1 Reply Last reply
    0
    • I imnotso

      Is the following scenario even possible as this is what 'appears' to be happening. I have an .aspx page with a .ascx control. I have a breakpoint set on the the page_load of the .aspx page. As I debug the code stops at the OnInit event, continues to the InitializeComponent, then the page_load of the .ascx control, then that's it, the page displays... It misses out the page_load for the actual .aspx page (I've set breakpoints). I have some code in there that needs executing so the page isn't displaying corrctly. Does the code think 'I've done a page_load, that's me done, I'll render now' ?? This project was VS2003 and has just been converted by VS2005 when loading... Are things done so differently in .NET2 regarding page_loads? Any help appreciated.. Harvey

      S Offline
      S Offline
      Sandilian
      wrote on last edited by
      #2

      Hi in my point try to reset IIS and try the debug again. Go to run and type iisreset click ok.

      I 1 Reply Last reply
      0
      • S Sandilian

        Hi in my point try to reset IIS and try the debug again. Go to run and type iisreset click ok.

        I Offline
        I Offline
        imnotso
        wrote on last edited by
        #3

        Hi, thanks for that, that has been tried, still no breakpoint. is it thinking I've done a page_load, that's it..no need to do the one from the .aspx page as it has done one in the control.

        S 1 Reply Last reply
        0
        • I imnotso

          Hi, thanks for that, that has been tried, still no breakpoint. is it thinking I've done a page_load, that's it..no need to do the one from the .aspx page as it has done one in the control.

          S Offline
          S Offline
          Sandilian
          wrote on last edited by
          #4

          ok man I have another suggestion for you. pdb files that vs is using for debugging are different than what the code is actually executing. so try to delete the aspnet temp file and rebuild it again than try the debug and use IE browser.

          I 1 Reply Last reply
          0
          • S Sandilian

            ok man I have another suggestion for you. pdb files that vs is using for debugging are different than what the code is actually executing. so try to delete the aspnet temp file and rebuild it again than try the debug and use IE browser.

            I Offline
            I Offline
            imnotso
            wrote on last edited by
            #5

            Thanks..... At the conversion is didn't add 1 line to the .aspx page... AutoEventWireup="true" This was the problem, thanks for your help though...

            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