One of the companies I work for recently took over a project from another vendor. As we started to maintain the site, we noticed that we could not drag and drop controls onto the page and get any more than a stub of the control. <asp:hyperlink runat=”server”></hyperlink> is ALL we got when we dropped the hyperlink control onto the designer.
In fact, every ASPX control on the page displayed the error, “Unrecognized tag prefix or device filter ‘asp.’”
What’s up with that?
Thinking that there must be something wrong with our development environment, or at least something wrong with how we have the project configured, I started my search on Google.
It seems the most common cause of this bug is that you have nested master pages. The fix is to open the master pages in the IDE and leave them up while you work on the other pages in your application.
Unfortunately, that wasn’t our problem. We are only using one master page at a time.
The other cause of the error that I found is defining the master page in the web.config file and not in the ASPX page.
Again, keeping the master page open fixes this problem.
Again, this wasn’t our problem. The master page is clearly defined in the ASPX page.
Someone else suggested deleting all the files in c:\documents and settings\[username]\application data\microsoft\visualstudio\8.0\ReflectedSchemas
Only that directory doesn’t seem to exist for VS 2008.
Other solutions were in reference to beta versions of Visual Studio 2008, so that’s clearly not my issue.
Up until this point I had been assuming that this code must have worked for the guys who originally developed the application. But by this point, I was ready to throw that assumption out the window. After all, this is the only application we have that exhibits this error.
So now it is time for the hacker’s method of solving a problem–move code around until you figure it out.
One thing that looked a bit odd to me is that they were using a content area to control the body tag for each page. They have a content area for controlling style sheet information too.
Aside from the fact that they should be using themes to control the style sheet that is being used, or they should at least be using one style sheet with page-specific classes (I guess that’s a rant for another day), I thought the body tag stuff looked suspicious. What happens if we move the body tag outside of the content place holder?
That one simple change fixed the entire issue.
So the questions that remain are:
- How did this ever work for the original developers?
- Can we use DIV tags and classes instead of relying on the body tag?
We are supposed to have a meeting with the original developers today to get the answers.
Other post in ASP.NET
- ASP.NET GridView Edit All Rows At Once - October 30th, 2007
- Validating A WebForms Checkbox . . . - January 4th, 2008
- ListView and the DataPager - January 7th, 2008
- The case of the disappearing session variables - January 14th, 2008
- Storing a DataRow into a Session (server) variable - January 15th, 2008
- The point of a multi layer architecture - January 31st, 2008
- FormView Edit and Add - May 12th, 2008
- Virtual Files using HttpContext.RewritePath() - July 17th, 2008
- ASP.NET AJAX using JSON - Here's how. - August 4th, 2008
- SystemException: The trust relationship between the primary domain and the trusted domain failed - November 18th, 2008
- GridViews - Multiple Rows Per Record - December 17th, 2008
- Response.Redirect() executes too soon on the Server. - January 27th, 2009
- Tab Control ActiveTabIndex Lost on Postback - February 25th, 2009
- ASP.NET Application_Error Detecting 404's - March 2nd, 2009
- Infinite 302 Loop - How would you even know? - March 11th, 2009
- Unable to find connection...for object web.config - March 18th, 2009
- Dynamically Change class Attribute From ASP.NET - September 29th, 2009
- HttpContext.Items vs Session - October 12th, 2009
- Access a control by ID From Within a Databound Control - November 2nd, 2009
- GridView and Updating A Row Manually - November 4th, 2009
- Embedding Google Search Appliance Results in ASP.NET - November 5th, 2009
- ASP.NET Cross Domain Form Submission - November 11th, 2009
- ASP.NET Interview Questions For New College Graduates - November 12th, 2009
- ASP.NET Dynamic Validator - November 16th, 2009
- The Google Appliance and Forms Authentication - August 4th, 2010
- Prevent Postback on Buttons - October 11th, 2010
- Azure CDN Blob Storage Case Sensitive Issue - April 17th, 2012
- ASP.NET JSON and ViewState - September 25th, 2012
- Panel DefaultButton does not work - December 25th, 2012
- Why CSS ID selectors are Evil in ASP.NET Web Forms - February 26th, 2013
- Sorting the ListView in ASP.NET - March 5th, 2013
- Multi-Step Processing in ASP.NET - May 8th, 2013
- ASP.NET Web Design Software - May 15th, 2013
- Test Sending Email without a Server in ASP.NET - June 5th, 2013
- Tracking Down Performance Issues in ASP.NET - July 24th, 2013
- Unrecognized Tag Prefix or Device Filter ‘asp’ - July 31st, 2013
- WebServices – Error Handling - December 11th, 2013
- Converting a DataList to a ListView - December 25th, 2013
- What’s the Truth about Running ASP.NET WEBAPI Asynchronously? - November 15th, 2016