Aspx designer file not updating

Sometimes that works – most times it won’t, but it’s worth a try. Next, if the above fails, right click on the ASPX page in the Solution Explorer and select Convert To Web Application.One of two things will happen here (at least for me).The problem here is that this is difficult to figure out. You see the error – the compiler is missing the controls – but you get no hint as to why the codebehind page is not behing generated.

aspx designer file not updating-11aspx designer file not updating-41aspx designer file not updating-81

The most common scenario for me is when I paste code in from another page.

For example I have a nearly standard header that I use on some pages that contain common toolbar buttons.

All of this also applies to full site WAP conversions.

If pages have errors in them that causes the markup to not compile properly mostly due to naming conflicts or full markup failures you can use this same process to fix pages – one at a time if necessary.

NET is trying to be helpful and add IDs for every server control it pastes into the new page even if that control originally did not contain an id. NET generates new ids for you and then fails to check the document if those ids already exist on the page.

For example: this is a simple toolbar header and it contains an image control.

If you just use the designer to create new pages it’s unlikely that the WAP codebehind generation will get munged up.

As to the duplicate ID problem that is usually the cause of problems for me when cutting and pasting, that is also controllable via configuration option in the Visual Studio options. I know, duh, but the error list did not show it and the control i was pasting or typing in new onto the form was the focus of the error because Visual Studio refused to create a designer code file reference.

Raise your hand if this has happened to you (i know it has to me a LOT of times recently): You’re working on a Web Application Project (WAP) page in markup and you paste in some code from another page.

Tags: , ,