Page Load Firing Twice

I converted to 2.0 and now hte page load fires twice on my web sites. I understand there may be a place where the converted inserted code that loads the page twice, but I can't find it in the code behind. I'm using vb. Thanks.

[235 byte] By [JennyMQuinn] at [2007-12-23]
# 1

Hi,

Maybe it can help but I have a similar issue and was because an event was fired on one of my controls (remember that events triggered on the page will execute the PageLoad before executing the event handler). You can check it puting a breakpoint and querying the IsPostBack property.

Otherwise explain a little more your architecture or page contents.

Regards

SalvaPatuel at 2007-8-30 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2

The page_load even somehow looked like...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load <=== notice the extra me.load

rather than

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

I don't know when or how it got in there, but I"m sorry I bothered everyone about such a silly thing. I hope anyone who has this happen to them can find this useful.

Thanks to Salvador Patuel, who tried to help!

JennyMQuinn at 2007-8-30 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3

Not a silly question at all.

I am seeing the same behavior on two of my pages involving a CrossPage Post. It seems like if I do not go through the same logic to initialize all the controls twice (which is potentially a lot of overhead) the page won't look right.

On the first Page_Load, Page.PreviousPage is set; the second time around Page.PreviousPage Is Nothing,

MarkFriedman at 2007-8-30 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified