G
Guest
I have the following ASPX page that I want to make compliant with XHTML
1.1:
=======================================================================
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<select id="List1" runat="server" size="5" multiple="multiple">
<option>Option 1</option>
<option>Option 2</option>
</select><br />
</div>
</form>
</body>
</html>
=======================================================================
When I try to build the page, I get the following error message:
-----------------------------------------------------------------------
"Cannot create an object of type 'System.Boolean' from its string
representation 'multiple' for the 'Multiple' property."
-----------------------------------------------------------------------
However, if I change the offending line to please VS.NET, an XHTML
validation error is thrown:
-----------------------------------------------------------------------
<select id="List1" runat="server" size="5" multiple>
....
Validation (XHTML 1.0 Transitional): This attribute name must be
followed by an equal (=) sign and a value. If the value is in quotation
marks, the quotation marks must match.
-----------------------------------------------------------------------
I have no idea why it's throwing an XHTML 1.0 Transitional error, if
I'm validating against the XHTML 1.1 DTD. But my main question here
is: how do I make the page compliant without raising errors in VS.NET ?
-= Tek Boy =-
1.1:
=======================================================================
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<select id="List1" runat="server" size="5" multiple="multiple">
<option>Option 1</option>
<option>Option 2</option>
</select><br />
</div>
</form>
</body>
</html>
=======================================================================
When I try to build the page, I get the following error message:
-----------------------------------------------------------------------
"Cannot create an object of type 'System.Boolean' from its string
representation 'multiple' for the 'Multiple' property."
-----------------------------------------------------------------------
However, if I change the offending line to please VS.NET, an XHTML
validation error is thrown:
-----------------------------------------------------------------------
<select id="List1" runat="server" size="5" multiple>
....
Validation (XHTML 1.0 Transitional): This attribute name must be
followed by an equal (=) sign and a value. If the value is in quotation
marks, the quotation marks must match.
-----------------------------------------------------------------------
I have no idea why it's throwing an XHTML 1.0 Transitional error, if
I'm validating against the XHTML 1.1 DTD. But my main question here
is: how do I make the page compliant without raising errors in VS.NET ?
-= Tek Boy =-