Dec 13, 2010 11:59 AM|cbruen1|LINK
Another cause of this is if you copy and paste code from an aspx page into another aspx page, the designer isn't aware of any new controls that have been pasted, even though they are seen by Intellisense - seems to be a bug to me. The soultion is to create
your control(s) in the aspx design screen and name them the same as any code you are pastting in, then paste in the code. This way the designer is aware of the control(s) and the code for them gets generated correctly in the designer.cs file.