views:

215

answers:

2

Visual Studio 2008 w/Sp1

To reproduce my problem I simply create a new .Net 2.0 web application and add a page with the following markup:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication5._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:button id="button1" runat="server" />
    </div>
    </form>
</body>
</html>

what happens is that a line is drawn under :button with the statement "Validation (): Element 'button' is not supported."

I've tried repairing the .net framework; however, that had no impact. This started happening on two different machines, one is vista the other is XP within the past week.

UPDATE: I closed this question because after spending 2 days trying to fix it I gave up and performed a complete reinstall of Visual Studio 2008. This resolved whatever was jacked up and now the machines in question work properly. I upvoted each of you for the help.

+1  A: 

Try "Button" (capital B):

<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button id="button1" runat="server" />
    </div>
    </form>
</body>
Michael Haren
Doesn't make a difference. As a matter of fact, I tried both dropping the button onto the design surface from the toolbox as well as hand typing it.
Chris Lively
What are your project references?
Michael Haren
This occurs on a brand new project, so the references are the standard ones initially applied.
Chris Lively
+1  A: 

Since this is the standard page that visual studio creates, except that you've added a button. We can rule out that there is anything wrong with the code.

I would start with what you said about "repairing the .NET framework". What was broken to begin with? Maybe your repair didn't fix the issue you had.

So from there, I would then examine what was recently installed on your computers.

I would then examine the web.config file to make sure it is referencing all the correct assemblies.

if you can provide anymore info that would help lots.

hmak