Designer file not updating visual studio
Before trying any solution just try to remove all the error from your aspx or ascx file, as any error on the file will prevent the Visual Studio to create a designer file for you, and it might happen that none of the solution will work for you.
Specifically WAP pages look at the page markup and then build the .(.vb) file.The big problem for me is that when I paste between pages ASP.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.As soon as you do this a new .file will be created for you with all the controls in it.Solution 2 : Delete your old .file if you want to update and create a new empty file with the same name, after saving your aspx or ascx file again, the designer class will be regenerated.For example: this is a simple toolbar header and it contains an image control.
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 ).
After some digging I started to look at the markup which looked like this: See anything strange? I added that back and tried again…and now it worked.
What also works in some situations is to first delete the designer file (.cs), not the code behind, and the save and close the solution file.
One of two things will happen here (at least for me).
You get a most helpful ‘General Exception Error’ in which case you’re screwed for the moment.
That was done by editing the project file like this: Add Just open a web application project and copy from that. The problem was when I started to add User Controls (ascx) and Web Forms pages (aspx) to my “new” project from my old UI project.