Page_Load in codebehind page is not working

In an attempt to narrow down an original problem with masterfiles, I've gone back to a really simple set of test files.  Even at their very simplest, I'm not getting any activity from a Page_Load sub.

I have:
Test.aspx (a line of text, an asp:label, and then another line of text) and
Test.aspx.vb (with a Page_Load line to assign text to the asp:label)
(Both attached)

I don't understand why but the Page_Load is not doing anything.
If I move the Page Load sub onto a page without a codebehind page, it works fine.
Is my codebehind file declared properly?

Who is Participating?
prairiedogConnect With a Mentor Commented:
Change your Page_Load signature to this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  'Your code
End Sub
JaCrewsConnect With a Mentor Commented:
It appears your page Load sub is incorrectly formatted:
Should be:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

BeamsonAuthor Commented:

I tried the textbook "Protected void Page_Load(object..." declaration and this works fine.
As I've mostly worked in older versions of the framework, a simple "Page_Load" has always done the job in the past.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

What is wrong with my comment?
Really recommend using: 
the free visual web developer from microsoft.  then you will not run into these kinds of little issues - it builds the front page and code behind for you, so you can spend your time focusing on the bigger coding :)
BeamsonAuthor Commented:
prariedog - don't know how that happened.  When I awarded the points to JaCrews, I am sure it was the only response showing.
BeamsonAuthor Commented:
I spotted this within seconds of my post but am so chuffed that its resolved, I'm more than happy to award the points.  I've spent HOURS not spotting this and getting nowhere.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.