Hi there,
With in-line code, VWD sets the AutoEventWireup property to True. With this setting on, the ASP.NET runtime is able to find the Page_Load method for the Page's Load event.
However, with a Code Behind file, this setting is Off by default, so you need to explicitly say that the Page_Load method is the event handler for the Page's Load event, like this:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
label1.text = "Hello"
label1.visible = True
End Sub
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.