Just add to the end of the sub routine:
Private sub Page_Load(..) Handles MyBase.Load
That is the equivalent to the one you posted, but easier. That approach is useful for when (say for example) you create a linkbutton (in the code behind page, and add it to a controls collection), and want a method to be fired when that button is clicked.
Brian
|