Controls not being registered in designer.cs
August 3, 2009
I’ve encountered this a few times now.
When dealing with a webform with an extraordinary amount of controls, ie. textboxes, dropdownlists, panels, etc. I’ve noticed that after x amount of controls have been added they are no longer registered in the designer.cs file.
I notice this by first the control not showing up in intellisense when trying to use it in code-behind. If I manually type it out I will still get a build error.
So, at this point I have to manually register any new controls in the designer.cs file. At the top of the file it says,
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
However it seems that they are never lost and now everything works fine. I am not sure if this is normal behavior and this is what you are suppose to do, but so far it has worked for me.
Has anyone else seen this, does anyone know the exact amount of controls that you can add to a page before they are no longer registered in the designer.cs?
-
http://www.krazier.com Micah
-
Categories
- asp.net (11)
- Blog (1)
- Business (5)
- Conferences (1)
- Errors (3)
- Portfolio (2)
- Reviews (2)
- SQL Server (3)
- Tips (1)
- Uncategorized (1)
- Web Development (13)
-
Archives