|
-
March 14th, 2007, 11:36 AM
#1
[RESOLVED] Page_Load Question (VB)
For some reason my Page_Load seems to not be executing.
I'm using Visual Web Developer Express for this test project.
I've search the forum a bit and found some solutions for C#, but nothing for VB.
Here is my code
Code:
<script runat="server">
Sub Page_Load()
lbl1.Text = "The date and time is " & Now()
End Sub
</script>
<html>
<body>
<form id="Form1" runat="server">
<h3><asp:label id="lbl1" runat="server" /></h3>
</form>
</body>
</html>
The label doesn't appear at all.
Anyone have any suggestions?
Thanks
-
March 14th, 2007, 11:39 AM
#2
Re: [RESOLVED] Page_Load Question (VB)
Ok:
I changed AutoEventWireup to True and the problem went away.
Code:
<%@ Page Language="VB" AutoEventWireup="True" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|