ASP.NET Generic template

S

Steven Nagy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top