View Single Post
  #3 (permalink)  
Old July 25th, 2013, 06:38 PM
Oleg Kolpashchikov Oleg Kolpashchikov is offline
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