ASP.NET Generic template

  • Thread starter Thread starter Celine
  • Start date Start date
this.mainObject = (mType)Session[mName];

Perhaps you need:

this.mainObject = (_BaseForm)Session[mName];

As long as your base form implements the required methods, and of
course this.mainObject is declared of type _BaseForm.
Otherwise interface might help, but abstract class is still better.
 
Back
Top