Click here to Skip to main content
11,490,973 members (61,150 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET

This issue comes across when solving one problem related to page cresh.
When i was debugging my code that time i have observed that my Page_PreInit event fired two time.

I want to investigate on this issue that why the Page_PreInit event firing more then one.(what's the strange behaviour of the page and it's control)

when i go line by line i have observed that when the page onload() & page onunload()
event fired that time this Page_PreInit event invoke.

Please guid me to resolve this issue or correct me if going in wrong direction.

Posted 1-Jun-12 22:56pm
Rahul Rajat Singh at 2-Jun-12 8:02am
Are you sure this is for the page and not of some user control.
deepakaitr12345 at 2-Jun-12 8:46am
100% sure.
and i got some information regarding this i.e. if you have some controls like treeview it's event fired first then the page event fired.I am trying to find out in this way how the cycle is been exicuting.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 521
1 Andy Lanng 288
2 Sascha Lefèvre 240
3 Maciej Los 195
4 OriginalGriff 163
0 Sergey Alexandrovich Kryukov 9,829
1 OriginalGriff 8,520
2 Sascha Lefèvre 3,574
3 Maciej Los 3,151
4 Richard Deeming 2,370

Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 2 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100