I work hard, so you don't have to

Conflicting Classes

Yet again, I was the victim to two different classes in two different pages inheriting from the same code behind file. This will run absolutely fine but when you try to build the project unless you cantered for the withevents you will find that nothing on the page has been declared.
Let me go into a bit more detail...

In the above image you can hopefully tell what is going on. It's a love triangle between two forms and a codebehind file.
One of the forms has declared all of the withevents for the code behind and the other has different items.
In the above example page1.aspx has an item called txtInput, and page2.aspx has an item called txtOutput.
The code behind handles the item txtInput but when page 2 tries to inherit this it will tell us there is no such thing as txtInput.
So what next? Make sure your codebehind has a reference to the withevent you want to access.
If this article made no sense to you it probably means you haven't come across this problem yet, if it did make sense let me know what you think. I may be displaying some of these responses soon; I just need to get around to writing the loop for it.
Copyright 2011 CodersAdvocate ©