Sunday, August 27, 2006

 
Unrecognized tag prefix or device filter 'asp'. - Keep both the nested master page and the content page open on VS 2005

Whilst many people run into this design-time error in Visual Studio, the "solution" to the problem is not very wide spread.

If you are building a ASP.Net project and you get this message you are most likely using Nested Master Pages. If not then you got a bigger problem I'm afraid such as maybe the installation of VS is corrupted or, for some bizarre reason, you are missing a reference to System.Web on your ASP.Net project which is very unlikely, but hey, VS can be stupid after all as we all know.

And this is exactly the case here. As you know, visual studio is not very friendly at all with pages that derived from nested masters. You lose your design-view and you're forced to code everything by hand on the content page. Moreover, sometimes you might see the error Unrecognized tag prefix or device filter 'asp'. on your content page and you will lose Intellisense on it for every ASP.net-related control and the hints will be filtered by HTML tags only.

Whilst you can't get around the former, you can fix the latter. Just keep your master page file open on VS while working with your content page and voila! error's gone and you can use Intellisense again! You don't need to keep both the parent master and the nested master, just the one the content page inherits from will do.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?