Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 28th, 2003, 09:54 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default PhilePage execution order

Hi all,

Just wondering, on my first request to a protected page, whereby the login screen comes up, i see the following order of events

aspx.page Begin Init
 In Derived OnInit 0.000697 0.000697
 In SitePage OnInit 0.001714 0.001017
aspx.page End Init 0.002163 0.000449
 In Derived PageLoad 0.002942 0.000779
 In SitePage PageLoad 0.004038 0.001096
 In Derived PageLoad 0.004109 0.000071
aspx.page Begin PreRender 0.004157 0.000048

Instead of the expected:

Derived OnInit -> PhilePage OnInit -> PhilePage PageLoad -> Derived PageLoad

I believe my event handlers are being wired in the proper order in the derived page:


Protected Overrides Sub OnInit(ByVal e As EventArgs)
         Trace.Warn("In Derived OnInit")
         MyBase.OnInit(e)
         InitializeComponent()
      End Sub


      'This call is required by the Web Form Designer.
      <System.Diagnostics.DebuggerStepThrough()> _
      Private Sub InitializeComponent()
         AddHandler Me.Load, AddressOf Page_Load
      End Sub

After this first request, everything runs as expected. Anyone else encountering a similar situation?

Jake
  #2 (permalink)  
Old August 28th, 2003, 10:29 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello again....acually, the execution order is not as expected on other pages as well b/c when the user tries to access a protected page, thier Principal is not loaded b/c the PhilePage PageLoad event hasn't fired yet! It is doing the same thing as before:

Derived OnInit -> PhilePage OnInit -> Derived PageLoad -> PhilePage PageLoad -> Derived PageLoad

please help!

  #3 (permalink)  
Old August 28th, 2003, 11:56 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

All,

I think I have discovered the reason for this madness. If we follow the reccomendation of having this code in our derived pages:

'This call is required by the Web Form Designer.
      <System.Diagnostics.DebuggerStepThrough()> _
      Private Sub InitializeComponent()
         AddHandler Me.Load, AddressOf Page_Load
      End Sub

Then be sure to removed the 'handles MyBase.Load' from your Page_Load methods...which the designer automatically creates for you when you create a new web form. I am sure a similar fix exists for the C# version.

Jake

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Execution B.V.Madhav Crystal Reports 0 May 9th, 2005 04:50 AM
PhilePage Class on p. 58 JeffSpitzer BOOK: ASP.NET Website Programming Problem-Design-Solution 0 February 8th, 2004 09:08 AM
PhilePage Session ? jfreise BOOK: ASP.NET Website Programming Problem-Design-Solution 0 August 20th, 2003 10:31 AM
PhilePage.cs Page_Load event betulus BOOK: ASP.NET Website Programming Problem-Design-Solution 2 June 10th, 2003 02:46 AM
document node order vs sort node order. ladyslipper98201 XSLT 2 June 5th, 2003 11:06 AM



All times are GMT -4. The time now is 01:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.