I am trying to validate my ASP.NET page in W3C validator. I am getting following errors. Can anyone help with this?
No DOCTYPE found! Checking XML syntax only.
The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax, or that your XML document is not using a DOCTYPE Declaration.
Validation of the document has been skipped, and a simple check of the well-formedness of the XML syntax has been performed instead.
Learn how to add a doctype to your document from our FAQ, or use the validator's option to validate your XML document against a specific Document Type
Byte-Order Mark found in UTF-8 File.
The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.
Validation Output: 2 Errors
Line 1, Column 1: character "<%" not allowed in prolog
<% @ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireu…
Line 6, Column 77: document type does not allow element "asp:Content" here
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).