Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 23rd, 2004, 11:08 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
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...
  #2 (permalink)  
Old November 26th, 2004, 01:41 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
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
  #3 (permalink)  
Old November 26th, 2004, 01:43 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
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
  #4 (permalink)  
Old November 29th, 2004, 01:17 AM
Registered User
 
Join Date: Nov 2004
Location: , , .
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...
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.