Results 1 to 9 of 9

Thread: ASP.NET 2.0 and XHTML Strict

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member bsw2112's Avatar
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    292

    ASP.NET 2.0 and XHTML Strict

    Hello

    I have two problems (I hope they are not serious)
    Say I have the following code that needs to validate to XHTML 1.0 Strict

    Code:
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    
    <head>
    	<!-- TITLE BEGINS --><title>Example</title>
    	<!-- TITLE ENDS -->
    
    	<!-- META STARTS-->
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
    	<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
    	<meta name="dc.title" content="Example"/>
    
    	<!-- META ENDS -->
    
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        Hello World!!!
        </div>
        </form>
    </body>
    </html>
    I though all I would need to do is add this to the web.config so that it would validate to XHTML Strict

    Code:
    <xhtmlConformance mode="Strict" />
    but when I tried to validate with the W3C validator I got the message that the page tentatively passed validation and that overridding needed to take place.

    W3C validator told there was a Character Encoding Override in effect!

    and

    The detected character encoding "iso-8859-1" has been suppressed and "utf-8" used instead.

    Is it possible to validate to XHTML strict using iso-8859-1?

    Another thing is how do I get around the __viewstate that starts with the underscore? I know that ASP.NET 2.0 puts a div around it so that a block element holds the input (W3C validator is happy) but CSE Validator tells me that an underscore cannot start the value of an id or name attribute

    Is there a work around for this and also when I take the server output from the view source and copy it to an html extension file, it validates. Is this a problem with the aspx extension?

    I am not allowed to change the encoding.

    Thanks in advance

    bsw
    Last edited by bsw2112; Mar 26th, 2007 at 05:25 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width