这几天突然发现自己的vs2008在编写aspx文件时时候输入<asp:以后居然没有智能提示了,而且编译的时候居然出现了Validation (): Element 'xx' is not supported的warning 郁闷死了,今天回来将vs设置恢复成初始设置还是有,将vs删除重装还是有,郁闷,googe了好久在
发现了mikhail Arkhipov提供的解决方案:
A few people reported that Visual Web Developer displayed validation error on fairly simple Web forms not recognizing ASP.NET controls. I would recommend to look at this thread in ASP.NET forums where Todd (who owns intellisense and XML schema generation) provides a few insights and possible solutions.
blogged earlier that in VS 2005 we switched from using static XML schemas to automatically generating them using reflection on Web controls. XML schemas are generated on demand as you open pages in your Web site. They contain information about ASP.NET controls, custom and user controls. You can find generated files cache in
C:\Documents and Settings\[Username]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas
So, the first thing you want to do if you see dreaded "'asp' is an unrecognized tag prefix or device filter" error is to close all VS instances and then delete the folder contents. Restart VS, open your Web site and we will generate schemas again.
Success of the schema generation depends on several things so you may want to check in web.config is in good shape
Remember, we employ XML validation so each schema is attached to a particular element (similar to how xmlns:ns attribute works). Typically control schemas are attached to one of the top level elements such as BODY or HTML (except when page is not supposed to have any), so if your page misses root element, you may end up getting the "'asp' is an unrecognized tag prefix" error simply because we didn't find any suitable root element to attach schemas to.
We are eager to improve the algorithm so please report issues either in ASP.NET forums or on the MSDN Freeback site. If you can include zipped Web site, please do so. Feel free to contact me directly as well.

简单的来说就是将 C:\Documents and Settings\[Username]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas目录下所有文件全部删除
然后重启vs2008,加载你的网站就不会出现上述问题,删除之前必须关掉所有的vs程序