Note: This is an update to an earlier post based on feedback that I have received from various commenter's.
If you have adopted beta 2 of Visual Studio 2010 then you might have spotted a large amount of green squigglies underneath the tags in your markup. When you have over them you see a message like this:
Validation ($SCHEMA$): Element 'div' is not supported
This appears to be a bug in the system. When this is occurring your autocomplete will not have any html element – only asp.net controls and snippets – which makes it pretty hard to do your work.
To fix this error without resetting all of your Visual Studio configuration settings back to factory defaults follow these steps:
- Click Tools | Options…
- If you have "Show all settings" unticked then you can click the Validation node.
Otherwise you will have to click Text Editor | HTML | Validation.
- Make a selection in the Target: drop down (I picked XHTML 1.0 Transitional).
- Click OK to save your changes.