views:

25

answers:

1

Hi Found this question on an interview site Given the following methods of the ASP .Net Page class, in which of them would you attach an event handler to an event published by a control on the web page? a) OnLoad() b) Page_Loader() c) OnInit() d) OnPostBack()

Can't decide between OnLoad and OnInit. Can anyone explain it to me?

A: 

That doesn't seem like a very good interview question. While there are differences between OnInit and OnLoad, none of them apply to attaching an event handler to an event.

Jason Berkan