ASP.Net User Control Best Practice
My previous post about invalid cast exceptions turned out to be inaccurate. Unfortunately, it was more in depth than that. I am working on a project that has 37 user controls. Until today, those controls were dispersed throughout the project in different sub folders. This apparently is a bad practice. If you have controls in two separate folders and Control A in folder Z references Control B in folder Y; and then you have Control C in folder Y referencing Control D in folder Z, that creates a circular reference. This is because each folder in a website compiles into a separate assembly. Assemblies cannot have circular references.
Here's an article explaining it a bit more. Moral of the story, put all your controls in a single directory or take the painstaking effort to be sure references don't exist in two directions.
加油,哥们,现在开始!