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 November 23rd, 2004, 11:08 PM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why this example doesn't work

I followed the instructions and type the code following in the WebMatrix, but it seems have something wrong with it!
Code:
<html>
<head>
    <title>Inserting ASP.NET code Example</title></head>
<body>
    Line1: First HTML Line<br />
    Line2: Second HTML Line<br />
    Line3: Third HTML Line<br>
</body>
</html>
it is the example in Chapter 2 and the file name is messageHTML.aspx

The error output is
Code:
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: CS1519: Invalid token '<' in class, struct, or interface member declaration

Source Error:

 

Line 2:  <script runat="server">
Line 3:  
Line 4:      <html>
Line 5:      <head>
Line 6:          <title>Inserting ASP.NET code Example</title></head>
 

Source File: C:\BegASPNET11\Ch02\messageHTML.aspx    Line: 4
why in line 4?

Kini kita sudah berpisah, Mohon doa engkau bahagia...
 
Old November 26th, 2004, 01:41 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

I think you've missed out the page directive from the top of the aspx file.

    <%@ Page Language="C#" %>

Regards
Ganesh
 
Old November 26th, 2004, 01:43 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

I think you are crossing posts

http://p2p.wrox.com/topic.asp?TOPIC_ID=22556

Please do not cross posts and send ur posting only once

Regards
Ganesh
 
Old November 29th, 2004, 01:17 AM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your advice and I have found the error!

Kini kita sudah berpisah, Mohon doa engkau bahagia...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 1 Ctrl+F5 don't work, F5 does work? jimboak BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 June 29th, 2008 03:46 AM
why it doesn't work sangfroid C# 2005 2 January 21st, 2008 02:38 PM
Ok, this should work but it is not polorboy PHP How-To 0 January 25th, 2007 01:34 PM
Able to Get it work !! rsrika C# 2005 0 March 8th, 2006 09:16 AM





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