Greetings,
I just converted an ASP.NET Web Site Project to a Web Application Project in VS 2010. After I run the application though it seems that my class polymorphism broke. I don't have a clue as to why this could occur.
So in the following code when I call base.OnLoad(e) I am getting errors in the base class because the variable myString is null. In fact all the variables for the Base class are null. I can do
base.myString = this.myString;
before
base.OnLoad(e);
but this doesn't seem to be polymorphic to me.
Code:
public partial class FormA : Web.ClassB
{
protected override void OnLoad(EventArgs e)
{
myString = "TEST";
base.OnLoad(e);
}
}
public class ClassB
{
protected String myString;
protected override void OnLoad(EventArgs e)
{
// Class C has a virtual OnLoad method (not shown here)
}
}