Mike Mike - 3 months ago 18
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>
<form id="form1" runat="server">

<div align="center">


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

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

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


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


What are the errors you are getting?


Here's a simple fix someone had:


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.