Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 1.1
This is the forum to discuss the Wrox book Beginning ASP.NET 1.1 with Visual C#.NET 2003 by Chris Ullman, John Kauffman, Chris Hart, Dave Sussman, Daniel Maharry; ISBN: 9780764557088
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.1 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 January 27th, 2006, 03:26 AM
Registered User
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with the first application

Hello all here,
I'm new to asp.net.I follow the book to do my first application,my all source code is :
<%@ Page Language="C#" %>
<script runat="server">

        void Page_Load()
    {
        time.text=DateTime.Now.ToString();
    }

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        Currently Time:
     <asp:Label id="time" runat="server"></asp:Label>
    </form>
</body>
</html>
But I couldn't run it.I couldn't find the error in code.The error message is:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0117: 'System.Web.UI.WebControls.Label' does not contain a definition for 'text'

Source Error:
Line 6: void Page_Load()
Line 7: {
Line 8: time.text=DateTime.Now.ToString();
Line 9: }
Line 10:
And I am working through the book Beginning ASP.Net 1.1 with visual c#.net 2003.The OS is Win 2K.
What can I do?Help me.
Coffee

A new man .
 
Old January 27th, 2006, 04:06 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

C# is case sensitive, so you shouldn't use time.text but time.Text with a capital T instead:

time.Text=DateTime.Now.ToString();

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old January 27th, 2006, 05:07 AM
Registered User
 
Join Date: Jan 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
Thanks so much.I've found the mistake and want to delete this topic.But you have replyed for me.
So... :p
Thank you.


Coffee

A new man .





Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.exit() fails to terminate application. saumya General .NET 1 January 4th, 2008 09:50 AM
Web Application OR Windows Application adesilva .NET Framework 2.0 2 May 4th, 2007 07:12 AM
Blog application: Is this an Error in application yousaid BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 31 February 7th, 2007 02:57 PM
Console application and web application nsrujan ASP.NET 1.0 and 1.1 Basics 1 April 16th, 2005 10:35 PM
Web application Vs Windows Application Ned .NET Web Services 2 January 20th, 2004 01:27 PM





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