Mike Mike - 1 month ago 10
ASP.NET (C#) Question

.aspx code errors "Element 'xxxx' is not supported."

I'm getting a bunch of these errors for my image buttons, link buttons, text boxes, and labels. These errors are in my .aspx code. Why am I getting so many?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmSearchPersonnel.aspx.cs" Inherits="frmSearchPersonnel" %>

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

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

<div align="center">


</div>

</div>
<asp:Label ID="Label1" runat="server" Text="Search for employee by last name"></asp:Label>
<asp:TextBox ID="txtSearchName" runat="server"></asp:TextBox>
<p>
<asp:Button ID="btnSearch" runat="server" PostBackUrl="~/frmViewPersonnel.aspx"
Text="Search" onclick="btnSearch_Click" />
</p>
</form>
</body>
</html>.


The errors are under Label, TextBox & Button above in blue. The errors state:


Validation (): Element 'xxxx' is not supported.

Answer

The only problem I & my Resharper see is the period after the ending html tag.

</html>.

What are the errors you are getting?

Edit:

Here's a simple fix someone had:

http://weblogs.asp.net/alaaalnajjar/archive/2010/08/31/how-to-fix-quot-validation-element-xxxx-is-not-supported-quot-visual-studio-2010.aspx

the idea is to remove the folder "ReflectedSchemas" from paths:

Win XP : C:\Documents and Settings{username}\Application Data\Microsoft\VisualStudio\10.0\ReflectedSchemas

Win Vista / 7: C:\Users\AppData\Roaming \Microsoft\VisualStudio\10.0\ReflectedSchemas

Note: make sure that "Show hidden files, folders, and drives" is selected from Folder Options,also don't forget to close VS before deleting the folder.

This solution should work for VS2010 and VS2008,at VS2008 you have to delete ReflectedSchemas from folder 9.0 not 10.0.

Comments