VS.NET 2005, XHTML and the Select tag

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 =-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top