J
Jay
I'm currently reading ASP.NET Unleashed Second Edition and going through the
examples using the ASP.NET Web Matrix. I'm on chapter one doing the
Trace.aspx example and I get the following error message: There can be only
one 'page' directive.
Could someone please explain to me why I get this message? After I received
this message I went to the CDROM and copied the code from there and got the
same message again.
Here is the code from the book/CDROM:
<%@ Page Trace="True" %>
<Script Runat="Server">
Sub Page_Load
Dim strTraceMessage As String
Trace.Warn( "Page_Load event executing!" )
strTraceMessage = "Hello World!"
Trace.Write( "The value of strTraceMessage is " & strTraceMessage )
End Sub
</Script>
<html>
<head>
<title>Trace.aspx</title>
</head>
<body>
<h2>Testing Page Trace</h2>
<% Trace.Warn( "Rendering page content!" ) %>
</body>
</html>
Thank you!
--
"Some see the glass as half-empty;
some see the glass as half-full.
I see the glass as too big." - George Carlin
- J
examples using the ASP.NET Web Matrix. I'm on chapter one doing the
Trace.aspx example and I get the following error message: There can be only
one 'page' directive.
Could someone please explain to me why I get this message? After I received
this message I went to the CDROM and copied the code from there and got the
same message again.
Here is the code from the book/CDROM:
<%@ Page Trace="True" %>
<Script Runat="Server">
Sub Page_Load
Dim strTraceMessage As String
Trace.Warn( "Page_Load event executing!" )
strTraceMessage = "Hello World!"
Trace.Write( "The value of strTraceMessage is " & strTraceMessage )
End Sub
</Script>
<html>
<head>
<title>Trace.aspx</title>
</head>
<body>
<h2>Testing Page Trace</h2>
<% Trace.Warn( "Rendering page content!" ) %>
</body>
</html>
Thank you!
--
"Some see the glass as half-empty;
some see the glass as half-full.
I see the glass as too big." - George Carlin
- J