Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page_Load is called 12 times?

Reply
Thread Tools

Page_Load is called 12 times?

 
 
George Ter-Saakov
Guest
Posts: n/a
 
      12-02-2003
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.


 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      12-02-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      12-02-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
George Birbilis
Guest
Posts: n/a
 
      12-03-2003
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=somethingel se&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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Materpage page_load event fired after content page_load? rockdale ASP .Net 1 11-16-2006 06:59 PM
in VB.NET Page_load of a base class called after the derived class Page_load ? z. f. ASP .Net 0 10-19-2004 12:01 PM
Why does page_load fire twice when inheriting from a common overridable Page_Load bminder ASP .Net 1 02-23-2004 08:54 PM
Page_Load called twice??? Andy ASP .Net 4 10-20-2003 09:00 AM
Re: Determinig what events will be called from Page_Load ??? John Saunders ASP .Net 4 08-22-2003 09:23 AM



Advertisments