ASP.NET 2.0 -- Page_Load called multiple times

A

amitku

I am working on a web site and whenever someone arrives at the home
page, I'm trying to track this by inserting some values into my
database.

I do so from the Page_Load function. Unfortunately for some reason,
for each person entering my website, I get 3 entries in my database!


I've been reading everywhere to figure out why this could be happening,

but I'm out of ideas.


1) I've made sure that Page.IsPostBack is set to false. No
improvement.
2) I also set AutoEventWireup to false, but then my Page_Load function
wouldn't called at all, so now I've set it back to being true...


Any ideas or suggestions would be appreciated.


Thanks in advance,
Amit
 
G

Guest

amitku,
I use the server log because it involves much less coding. Sorry I don't
know why your getting three hits.

Good Luck
DWS
 
A

amitku

I'm doing some additional tracking...the website has a asp parameter
that I use to track certain other variables, so I can't use the server
log.

Anybody out there with any ideas why Page_Load can be called multiple
times?

Thanks in advance,
Amit
 
A

amitku

It turns out Google Adsense is the reason for the extra calls to
Page_Load. Removing the adsense code made everything work dandy. But
this makes no sense to me....does anybody know why this is the case,
and if so, how can I get around this (besides removing the adsense
permanently)?

Thanks in advance,
Amit
 

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

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top