Unrecognized tag prefix or device filter 'asp'

Date Published: 29 August 2006

Unrecognized tag prefix or device filter 'asp'

This error was bugging me today so I finally went searching for an answer. I found it here.

The short version – if you’re using nested master pages and you’re seeing all of your <asp: … /> tags underlined and complaining with “Unrecognized tag prefix or device filter ‘asp’.” the solution is to keep your nested master page open in Visual Studio. That’s right – it sounds stupid – but that’s the fix.

So, if you have a Page that references a master page called ChildMaster.master which references ParentMaster.master, you should open ChildMaster.master (even if you don’t plan to make any changes to it) and leave it open in the IDE while you work on pages that refer to it.

Hopefully this will be fixed in a later update.

Steve Smith

About Ardalis

Software Architect

Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.