Wednesday, March 28, 2012

simple ascx page_load firing twice

I have a simple user control (.ascx) that is dynamically instantiated in the
calling aspx page and added to the control tree (within the page_load.)

I have checked and the calling page only executes it's page_load once. Why
is the page_load of the ascx fired twice?

Thanks in advance,
stanIf you are using code-behind, check that the AutoEventWireup Page attribute,
located at the top of the aspx page, is set to false.
--
Peter O'Reilly
"Peter O'Reilly" <Peter_OReilly@.timeinc.com!N!O!.S!P!AM!> wrote in message
news:evxKlrCGEHA.576@.TK2MSFTNGP11.phx.gbl...
> If you are using code-behind, check that the AutoEventWireup Page
attribute,
> located at the top of the aspx page, is set to false.

What if it is set to false, and the ascx page load fires twice still?

0 comments:

Post a Comment