Sharepoint 2007 Parser error on updating page layout

Recently I found a really odd Parser error when updating a Sharepoint 2007 Page Type. After uploading the new aspx, I'm getting the following error:

Server Error in '/' Application.

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls.

Source Error:

<html xmlns:mso="urn:schemas-microsoft-com:office:office" 
<!--[if gte mso 9]><xml>

So strangely enough I don't have those html lines below </asp:content>. After scratching my head for a whole hour (and plenty of experimentations), I found that it's caused by a typo. The opening content tag was using upper case C, while the closing was not.

<asp:Content ’¦ > // upper case 'C'

Took me a while to figure it out, so I thought I'd share it here.

  1. Zeddy says:

    ack! Mismatched Closing Tags caused by Case-Sensitivity due to lack of caffeine...this is the kind of errors that should've been picked up by the Editor. No squiggly red lines eh? :)

  2. ronaldwidha says:

    the client is still on VS2005 for this one. no squiggly red lines I'm afraid.

  3. Bijay Kumar says: might be helpful