Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 21st, 2013, 12:36 AM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default Chapter 2, possible errata - Page_Load event in code behind

On page 50, step#5 there may be a conceptual misstatement. Here it says that the code "fires when the page loads in the browser." I don't know this is technically correct.

This code fires when the page loads on the server, BEFORE it gets sent to the browser. After it gets processed on the server and transformed into HTML, it gets sent to the client, at which time the HTML page actually loads in the browser.

An example of an event that actually fires upon loading in the client browser would be the JavaScript event called window.onload.
Reply With Quote
  #2 (permalink)  
Old July 21st, 2013, 12:46 AM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default

By the way, I'm not trying to be nit picky. Rather, these small details are so crucial. You hear people describing things like this a lot, but it's so important to clarify these concepts and keep them straight (details like this can make all the difference in the world, from a programming perspective - as you know). The challenge to web programming, like most anything, isn't so much the tools or clicks, but the concepts and understanding exactly what's occuring from a logical step by step standpoint.
Reply With Quote
  #3 (permalink)  
Old July 25th, 2013, 06:38 PM
Authorized User
Points: 175, Level: 3
Points: 175, Level: 3 Points: 175, Level: 3 Points: 175, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2013
Location: St.Petersburg, Russia
Posts: 36
Thanks: 1
Thanked 4 Times in 4 Posts
Default Page_Load event handler

This must be a mistake in the book - Page_Load event has nothing to do with the browser, it is a server side event and the word "load" refers to ASP.NET server controls:
<asp:Label ID="Label1" runat="server" />
At this point in the page life cycle the server controls are "loaded", their state is reconstructed from the viewstate, you can do something to them in the code that runs within this handler:

Code:
protected void Page_Load(object sender, EventArgs e)
{ // code that fires on the server
    Label1.Text = "We can put a new text here";
}
e.g. "Text"-property of the Label control with ID of "Label1" can be changed to something else.
Reply With Quote
  #4 (permalink)  
Old July 30th, 2013, 02:00 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
Rather, these small details are so crucial.
I agree. I should have worded it differently. Since it's an introductory chapter I wanted to keep things simple, and this issue slipped through. Later chapters dig much deeper in how this works, and when pages are processed and which events they raise.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


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
Couple Of Code Errata AspNew BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 1 June 22nd, 2009 03:36 AM
Load external script within Page_Load Event kwilliams General .NET 0 October 9th, 2006 10:56 AM
Call right frame Page_Load event from left frame. ochanarachel Classic ASP Basics 0 January 28th, 2005 05:13 AM
Can not find Code and Errata? naveed ahmed All Other Wrox Books 4 August 19th, 2003 08:20 AM
PhilePage.cs Page_Load event betulus BOOK: ASP.NET Website Programming Problem-Design-Solution 2 June 10th, 2003 02:46 AM



All times are GMT -4. The time now is 07:33 PM.


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