Results 1 to 4 of 4

Thread: Page_Load event

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Page_Load event

    I have this script in an ASPX page that should execute when the page loads but doesn't and I don't know why:
    Code:
    <script runat="server">
    	Sub Page_Load
    		LabelWelcome.Text = The date and time is " & now()
    	End Sub
    </script>
    Does anybody have any ideas?
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Page_Load event

    VB Code:
    1. Sub Page_Load(sender As Object, e As EventArgs)

  3. #3

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Page_Load event

    It still doesn't work...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  4. #4
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Page_Load event

    I just tried your code on one of my pages, though I put it Page_Load of my code behind file, and it worked:

    Me.Label.text = "The time and date is " & now()

    I couldnt get it to work when I tried putting it in the HTML with the <script> tags.

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