Multiple Page_Load events firing

G

gellis99

I've searched several discussions on this topic and haven't been able
to resolve my issue. I have a function I call within the page_load
event of a page. This function makes a call to the database to
retrieve data. While I was doing performance review of the site, my
sql profiler showed that query being executed multiple times for a
single page load.

I'm using several web user controls on the pages, none of which call
this function. I've checked to make sure that the
AutoEventWireup="false" on the page. It appears the number of repetive
calls is related to the number of controls on my page; the more the
controls the more times it executes the Page_Load.

Can anyone provide any clues about this problem? It doesn't impact the
functionality of the pages, but I don't want to burn up excess
resources. Thanks.
 
G

Guest

Can you post "Short but Complete" example code that will enable somebody to
replicate this issue?
Peter
 
G

gellis99

Peter-

Thanks for your willingness to assist, but as it turns out, while I was
trying to pair down some of the code in order to show you what's going
on, I found that the function I'm calling makes a recursive call to
itself in some circumstances...sometimes it's the obvious things that
are the most obscure.

Thanks,
Greg
 
G

Guest

Exactly! Often during the process of preparing a code sample, we find the
issue ourselves.
Peter
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top