Page_Load is called 12 times?

Discussion in 'ASP .Net' started by George Ter-Saakov, Dec 2, 2003.

  1. I just find out in a debug that Page_Load is called 12 times when rendering
    the page.

    What could be the problem?

    All this page has is a bunch of UserConrols.

    I did check the InitalizeComponent. It hooked up only once there and
    AutoEventWireup="false"

    Thanks.
    George.
     
    George Ter-Saakov, Dec 2, 2003
    #1
    1. Advertising

  2. I uncovered what is causing this.

    I am calling the page with parameters as part of the URL.
    like
    http://www.mysite.com/mypage.aspx/param1/param2

    This syntaxes is causing that Page_Load is called multiple times.
    Not sure is it a bug or feature though.

    George.


    "George Ter-Saakov" <> wrote in message
    news:...
    > I just find out in a debug that Page_Load is called 12 times when

    rendering
    > the page.
    >
    > What could be the problem?
    >
    > All this page has is a bunch of UserConrols.
    >
    > I did check the InitalizeComponent. It hooked up only once there and
    > AutoEventWireup="false"
    >
    > Thanks.
    > George.
    >
    >
     
    George Ter-Saakov, Dec 2, 2003
    #2
    1. Advertising

  3. Sorry my bad.
    Just discovered that page is using relative URLs to the images.
    And when I am accessing
    http://www.mysite.com/mypage.aspx/param1/param2
    relative URL becomes http://www.mysite.com/mypage.aspx/param1/img/a.gif


    And Basically IE hits mypage.aspx 12 times.

    Thanks and sorry for jumping the gun too quick.
    George.

    "George Ter-Saakov" <> wrote in message
    news:...
    > I uncovered what is causing this.
    >
    > I am calling the page with parameters as part of the URL.
    > like
    > http://www.mysite.com/mypage.aspx/param1/param2
    >
    > This syntaxes is causing that Page_Load is called multiple times.
    > Not sure is it a bug or feature though.
    >
    > George.
     
    George Ter-Saakov, Dec 2, 2003
    #3
  4. why use /param1/param2 (how do you do that anyway?) and make it think it's a
    folder on the server?

    why not use ...mypage.aspx?param1=something&param2=somethingelse&param3=...
    as the URL?

    > Sorry my bad.
    > Just discovered that page is using relative URLs to the images.
    > And when I am accessing
    > http://www.mysite.com/mypage.aspx/param1/param2
    > relative URL becomes http://www.mysite.com/mypage.aspx/param1/img/a.gif
    >
    >
    > And Basically IE hits mypage.aspx 12 times.
    >
    > Thanks and sorry for jumping the gun too quick.
    > George.
    >
    > "George Ter-Saakov" <> wrote in message
    > news:...
    > > I uncovered what is causing this.
    > >
    > > I am calling the page with parameters as part of the URL.
    > > like
    > > http://www.mysite.com/mypage.aspx/param1/param2
    > >
    > > This syntaxes is causing that Page_Load is called multiple times.
    > > Not sure is it a bug or feature though.
    > >
    > > George.

    >
    >
     
    George Birbilis, Dec 3, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. z. f.
    Replies:
    0
    Views:
    563
    z. f.
    Oct 19, 2004
  2. Replies:
    4
    Views:
    3,764
    VickZaro
    Apr 4, 2006
  3. djskrill
    Replies:
    9
    Views:
    701
    djskrill
    Oct 1, 2003
  4. Apricot
    Replies:
    4
    Views:
    530
    velthuijsen
    Apr 16, 2004
  5. Radu
    Replies:
    7
    Views:
    714
    charlie_Stell
    Aug 28, 2009
Loading...

Share This Page