CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    158

    [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

  2. #2
    Join Date
    Oct 2005
    Posts
    158

    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
  •  





Click Here to Expand Forum to Full Width

Featured