The ASP.NET Ajax pageLoad() Method

An entry about asp.net | javascript Publication date 4. September 2007 13:31

Currently I'm down deep in a few ASP.NET projects that require a fair bit of client-side code, which if you're wondering should explain the flurry of Ajax related posts these days :)

One of the first things developers learn about when starting out with ASP.NET, is the 'magic' method called Page_Load. When they get a bit more experience, they soon discover that it applies to all the Page/Control events, and that it is in fact just some reflection work done by ASP.NET when AutoEventWireup is turned on. At this point one could move into a discussion on whether to use Page_Load or override OnLoad, but lets assume we don't mind the overhead this 'magic' incurs.

As it turns out, ASP.NET Ajax allows you to do much the same - any method titled pageLoad found within the scripts on a page will get hooked up to the Sys.Application.load event.

In fact, there's a client side life-cycle which somewhat resembles what you'll be used to on the server-side. You can read all about it here :)

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Powered by BlogEngine.NET 1.4.5.0

Welcome!

My name is Fredrik Kalseth, and this is my blog - thanks for visiting! I am fortunate enough to work with what I love for a living, and this blog is essentially the biproduct of that.

I work as a senior consultant for Capgemini, and am also an active participant in the Norwegian .NET community, as an avid attendee but also as a speaker (most recently at NNUG and MSDN Live).

As a developer, I have a wide circle of interest. My primary passion is for agile, test-driven development, with focus on best practices and clean code. That said, I also love to work on the frontend, especially with web development.

On Twitter? My handle is fkalseth. On LinkedIn? I`m there too.

NDC 2010

The conference to attend this summer happens June 16th-18th in Oslo, Norway. Are you going? Be sure to catch my talk on AOP while you're there!

 

Disclaimer

This is a personal blog; any opinions expressed here are my own and do not necessarily reflect those of my employer. All content herein is my own original creation, and as such is protected by copyright law. Unless otherwise stated, all source code posted on this blog is freely usable under the Microsoft Permissive License.

What Readers Talk About

Comment RSS