Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page_Load event not triggering 1

Status
Not open for further replies.

johnfrederick

Programmer
Sep 30, 2002
34
US
I'm running examples from a book and it appears that none of the Page events are triggering. Control events seem to work ok. The examples I'm trying to run have, in the aspx file, a Sub Page_Load routine for one-time code, such as opening a connection, starting a DataReader, and binding it to a dropdown list. A demo intended to output messages on each of the page events does nothing. Code on the TextChanged event for a text box works. I don't see anywhere that the Sub Page_Load routine is specified to be run on a page load event. Is it a magic name?
 
Tack this onto the end of your page_load:

Handles MyBase.Load

So:

private sub page_load(...) Handles MyBase.Load
penny1.gif
penny1.gif

The answer to getting answered -- faq855-2992
 
Thanks to link9 for the solution to my problem. I'm using a book titled ASP.NET Unleashed by Stephen Walther and many of the examples don't work as provided. Connect strings to the MSDE 2 included in .NET Prof. all have to be modified because referring to localhost doesn't work, none of these page event routines have the Handles MyBase.Load, Init, etc. and a number of them are flagged as having html syntax errors relating to <p> usage.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top