Aspx designer not updating


26-Aug-2015 10:01

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.

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.

All of a sudden you notice that the page’s generated control definitions (in the .file) no longer update.

You create new controls in markup or the designer and – they don’t show up in your code.

In the original page there was no id on the Image control. Only it so happens there’s already another control Image1 on the page (why that is is another point of debate for another day ).

The short of it is that this is enough for the WAP codebehind engine to fail.

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.

They’re not generic enough to put into a control of some sort or on a master page but generic enough that they get pasted around different pages and then customized for the specific page.The big problem for me is that when I paste between pages ASP.