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.1
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 Display Modes
  #1 (permalink)  
Old November 23rd, 2004, 11:53 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...

Kini kita sudah berpisah, Mohon doa engkau bahagia...
__________________
Kini kita sudah berpisah, Mohon doa engkau bahagia...
  #2 (permalink)  
Old November 24th, 2004, 05:42 AM
Authorized User
 
Join Date: Oct 2004
Location: sp, sp, Brazil.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

original code from book - code sample:

<%@ Page Language="VB" %>
<script runat="server">

    ' Insert page code here
    '

</script>
<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 />
    <form runat="server">

    </form>
</body>
</html>

at line 3, you forgot </script>

----------------------
wagner reatto
 


Thread Tools
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 01:38 PM
Able to Get it work !! rsrika C# 2005 0 March 8th, 2006 08:16 AM
Why this example doesn't work DietCoke ASP.NET 1.0 and 1.1 Basics 3 November 29th, 2004 12:17 AM



All times are GMT -4. The time now is 09:35 PM.


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