Page_Load Runs Twice?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Trebilcock

    #1

    Page_Load Runs Twice?

    I have setup a number of trace outputs to try and track down an error in a
    process within my webpage. In doing so I have noticed that the pageload sub
    is running twice, once after the other. Is this a feature or have I done
    something?

    Mike


  • Prodip Saha

    #2
    Re: Page_Load Runs Twice?

    Mike- you do need to share your codes. One of the reason could be- page_load
    event is referenced in the .aspx file but I am not certain w/o looking at
    the codes.

    Prodip


    "Mike Trebilcock" <tiger@trebilco ck.net> wrote in message
    news:%23LAYvL%2 3TFHA.2768@tk2m sftngp13.phx.gb l...[color=blue]
    > I have setup a number of trace outputs to try and track down an error in a
    > process within my webpage. In doing so I have noticed that the pageload[/color]
    sub[color=blue]
    > is running twice, once after the other. Is this a feature or have I done
    > something?
    >
    > Mike
    >
    >[/color]


    Comment

    • Tod Birdsall

      #3
      Re: Page_Load Runs Twice?

      Hi Mike,

      Make sure that AutoEventWireup is set to false in your @Page directive.
      If it is set to true, Visual Studio automatically hooks up event
      handlers.

      Hope this helps.

      Tod Birdsall, MCSD
      Blogger is a blog publishing tool from Google for easily sharing your thoughts with the world. Blogger makes it simple to post text, photos and video onto your personal or team blog.


      Comment

      • Juan T. Llibre

        #4
        Re: Page_Load Runs Twice?

        Besides the other suggestions you have received, which are good,
        if you are using SmartNavigation and ASP.NET 1.1, it could
        be the result of a documented bug which requires a hotfix.

        See http://support.microsoft.com/kb/827801



        Juan T. Llibre
        ASP.NET MVP

        Foros de ASP.NET en Español
        Ven, y hablemos de ASP.NET...
        =============== =======

        "Mike Trebilcock" <tiger@trebilco ck.net> wrote in message
        news:%23LAYvL%2 3TFHA.2768@tk2m sftngp13.phx.gb l...[color=blue]
        >I have setup a number of trace outputs to try and track down an error in a
        > process within my webpage. In doing so I have noticed that the pageload sub
        > is running twice, once after the other. Is this a feature or have I done
        > something?
        >
        > Mike
        >
        >[/color]


        Comment

        • Mike Trebilcock

          #5
          Re: Page_Load Runs Twice?

          I had smart navigation switched on to see what it did! Mess everything
          around by the looks of things.

          Thanks for all the replies, I ahve now turned it off and everything is as
          running as it should.

          Mike

          "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
          news:#l9bA9#TFH A.3280@TK2MSFTN GP09.phx.gbl...[color=blue]
          > Besides the other suggestions you have received, which are good,
          > if you are using SmartNavigation and ASP.NET 1.1, it could
          > be the result of a documented bug which requires a hotfix.
          >
          > See http://support.microsoft.com/kb/827801
          >
          >
          >
          > Juan T. Llibre
          > ASP.NET MVP
          > http://asp.net.do/foros/
          > Foros de ASP.NET en Español
          > Ven, y hablemos de ASP.NET...
          > =============== =======
          >
          > "Mike Trebilcock" <tiger@trebilco ck.net> wrote in message
          > news:%23LAYvL%2 3TFHA.2768@tk2m sftngp13.phx.gb l...[color=green]
          > >I have setup a number of trace outputs to try and track down an error in[/color][/color]
          a[color=blue][color=green]
          > > process within my webpage. In doing so I have noticed that the pageload[/color][/color]
          sub[color=blue][color=green]
          > > is running twice, once after the other. Is this a feature or have I[/color][/color]
          done[color=blue][color=green]
          > > something?
          > >
          > > Mike
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Juan T. Llibre

            #6
            Re: Page_Load Runs Twice?

            Well, now you know!

            ;-)

            Glad to see that was what was happening,
            and that switching off SmartNavigation was the fix.

            Mind you...you can *still* use SmartNavigation if you need it,
            but you'll have to install the hotfix for it to work correctly.

            Carry on!


            Juan T. Llibre
            ASP.NET MVP

            Foros de ASP.NET en Español
            Ven, y hablemos de ASP.NET...
            =============== =======

            "Mike Trebilcock" <tiger@trebilco ck.net> wrote in message
            news:u9YcoY$TFH A.2928@TK2MSFTN GP10.phx.gbl...[color=blue]
            >I had smart navigation switched on to see what it did! Mess everything
            > around by the looks of things.
            >
            > Thanks for all the replies, I ahve now turned it off and everything is as
            > running as it should.
            >
            > Mike
            >
            > "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
            > news:#l9bA9#TFH A.3280@TK2MSFTN GP09.phx.gbl...[color=green]
            >> Besides the other suggestions you have received, which are good,
            >> if you are using SmartNavigation and ASP.NET 1.1, it could
            >> be the result of a documented bug which requires a hotfix.
            >>
            >> See http://support.microsoft.com/kb/827801
            >>
            >>
            >>
            >> Juan T. Llibre
            >> ASP.NET MVP
            >> http://asp.net.do/foros/
            >> Foros de ASP.NET en Español
            >> Ven, y hablemos de ASP.NET...
            >> =============== =======
            >>
            >> "Mike Trebilcock" <tiger@trebilco ck.net> wrote in message
            >> news:%23LAYvL%2 3TFHA.2768@tk2m sftngp13.phx.gb l...[color=darkred]
            >> >I have setup a number of trace outputs to try and track down an error in[/color][/color]
            > a[color=green][color=darkred]
            >> > process within my webpage. In doing so I have noticed that the pageload[/color][/color]
            > sub[color=green][color=darkred]
            >> > is running twice, once after the other. Is this a feature or have I[/color][/color]
            > done[color=green][color=darkred]
            >> > something?
            >> >
            >> > Mike
            >> >
            >> >[/color]
            >>
            >>[/color]
            >
            >[/color]


            Comment

            Working...