|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
My aspx page wont display
The file below resides C:/inetpub/wwwroot
Code:
<script language="VB" runat="server">
Sub Page_Load()
Response.Write ("First ASP.NET Line <br />")
Response.Write ("Second ASP.NET Line <br />")
Response.Write ("Third ASP.NET Line <br />")
End Sub
</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 />
</body>
</html>
When I type in the URL of my virtual server:http://rick/messageHTML.aspx, I get the following error: Cannot Display Page "Only one top level element is allowed in an XML document. Error processing resource 'http://beg/messageHTML.aspx'. Line 8,..." I believe "Line 8..." refers to the <html> tag. This code, however, displays propely when I use Visual Studio 2005. It uses the URL: http://localhost:1358/wwwroot/messageHTML.aspx Can someone tell me why I'm getting this error? Do I need to reference the aspx file via a separate html page? Any help is much appreciated. Thanks. |
|
#2
|
|||
|
|||
|
The html tag should be above the script tag, for one thing, and the script should probably be in the head block.
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#3
|
|||
|
|||
|
Quote:
Thanks for the quick reply. When I put the html tag up top, all I get is source code ie, the page displays as source. If I put the file in C:\rick (my virtual folder) and then type in http://localhost/rick/messageHTML.aspx, the page displays the html but not the asp. |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > My aspx page wont display |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|