473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

There can be only one page directive

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
Nov 18 '05 #1
0 1120

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Poppy | last post by:
I opened an asp page in VS.net 2002 and then saved it as an aspx page, "mypage.aspx". I was prompted if I wanted to create the class file for the page and clicked yes. Now when I try and open...
3
by: Kevin Buchan | last post by:
I have a web page that I want to JIT compile using the 'src' attribute in the Page directive. I've done this many times and life has normally been great, as a result. However, I find myself...
2
by: Chumley Walrus | last post by:
I have some classic asp code that I want to keep in an aspx page, what is the page directive to use to keep the aspx page asp compatible? Thanks Chumley
1
by: Poppy | last post by:
I opened an asp page in VS.net 2002 and then saved it as an aspx page. I was prompted if I wanted to create the class file for the page and clicked yes. Now when I try and open the page I get...
5
by: homertbush | last post by:
When our asp.net pages are rendered out as html the page directive is still in the html. ie. The following page directive is present in the body of the html of the rendered page: <%@ Page...
3
by: Rotsey | last post by:
Hi, I have just installed the web application project addon for VS2005. I want to have a master page so I put a directive in the web config pointing to my page. Now I want to create a...
7
by: reju | last post by:
Hi, I am not using view state.I disabled the view state, but this hidden __VIEWSTATE variable and some text is coming when we are taking the view source.Is there any way to remove this variable?...
4
by: senfo | last post by:
This is probably a really stupid question, but what exactly is the <%@ Page %directive? I thought I knew the answer to this, but now I'm not so sure that I do. Essentially, what I'd hope to...
10
by: Ty | last post by:
Hello all, I have built a site in VS 2008. using IIS7. Site works fine. So I publish to a local folder. I then go into IIS7 and add a virtural directory pointing to the compiled folder and make it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.