Re: ASP.NET Generic template

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.

.



Relevant Pages

  • Re: Abstract Base form - can I fake it?
    ... So I'd have to implement the interface in the base form. ... compile time support for this. ... You could create an interface and have your forms implement it. ... even manage your forms as objects of the interface instead of form objects ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Help with inheritence and properties
    ... > public BaseForm() ... > The problem before is that from the base class your logic member refers to ... > I have a base form and a base logic class. ... > I'm then inheriting to create descendant form and descendant logic which ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Abstract Base form - can I fake it?
    ... You could create an interface and have your forms implement it. ... >I have a base form that really should be abstract. ... > One is called in the constructor (to get data objects of a derived type ...
    (microsoft.public.dotnet.languages.csharp)
  • Strange UI behavior
    ... I have a base form BaseForm:Form ... On BaseForm I have a panel public Panel1 ... On myForm I have a grid public Grid1, added to the Panel1 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Strange UI behavior
    ... > I have a base form BaseForm:Form ... > On BaseForm I have a panel public Panel1 ... > onload of this formI'm creating ...
    (microsoft.public.dotnet.languages.csharp)