For some reason, I'm getting this error when trying to test a code page on my computer.
It may have something to do with a faulty IIS installation, but I can't seem to find out what the problem is.
I get the following error:
error on line 1 at column 2: StartTag: invalid element name
Here is my Default.aspx:
<%@ Page Language="C#" %>
<html>
<head>
<title>Plating Trees</title>
<script runat=”server”>
protected void Page_Load(Object Source, EventArgs E)
{
/* Begin C# Code!*/
Tree tree1 = new Tree();
tree1.Grow(3);
tree1.Message();
}
</script>
</head>
<body>
<p><asp:label runat=”server” id=”Output” /></p>
</body>
</html>
Tree.cs:
/* A simple C# class! */
public class Tree
{
public int height = 0;
public void Grow(int h)
{
height += h;
}
public string Message()
{
Output.Text = "The height of tree1 is:<br/>” + tree1.height + feet";
}
}