Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2005, 11:58 AM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error - Not Displaying time

I have sample code from the book. It is not displaying the time and it is just displaying the message. Please advise.

<script language="vb" runat="server">
Sub Page_Load()
time.text=Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)
End Sub
</script>

<html>
<head><title>The Punctual Web Server</title></head>
<body>
  <h1>Welcome</h1>
  In WebServerLand the time is currently:
<asp:label id="time" runat="server" />
</body>
</html>
 
Old October 14th, 2005, 12:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Works fine on my machine, however, I would put the script section inside the head scope and put the following line in top of the document...
Code:
<%@ Page Language="vb" Debug="true" %>
Jacob.
 
Old October 18th, 2005, 01:32 PM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have MDAC version 2.8 installed, that may be the reason it is not working? What would be the different in my machine that does not allow script code to run?






Quote:
quote:Originally posted by jacob
 Works fine on my machine, however, I would put the script section inside the head scope and put the following line in top of the document...
Code:
<%@ Page Language="vb" Debug="true" %>
Jacob.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Continuous Time (Clock) mjwelker VB How-To 4 April 8th, 2009 05:15 PM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
problem displaying records in order of time ,date method PHP Databases 3 July 25th, 2006 08:16 PM
Displaying time in chronological order mg1966 Classic ASP Databases 3 January 24th, 2005 02:11 PM
displaying date and time harpua Classic ASP Databases 2 October 29th, 2004 09:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.