"George" <> wrote in message
news:...
> Page inheritance is a good thing. I am using it in any of my projects.
> But i am afraid, you misunderstand what you want.
Actually, I know exactly what I want. What I'm having trouble with is what
ASP.NET can do.
> First to answer your question.
> You can specify class name using
> <%@ Page ClassName="MyClass" %>
> and use that name.
Cool.
> It does not make sence to inherit from page that has HTML. I do not see
> how would your HTML mix if let say Page1 has HTML and Page2 has HTML and
> Page2 inherits from Page1.
Well, I think it does make sense. A type of this inheritance occurs with
master pages. And, in fact, I want the exact same layout in my "derived"
page. It would just change the underlying SQL. But perhaps this type of
inheritance is not possible with ASP.NET.
> You inherit the common method and properties. But not HTML.
> For that you need to create page clsStandardPage in APP_CODE folder which
> inherits System.UI.Web.Page
> And your pages inherit clsStandardPage
> <%@ Page Language="C#" Inherits="clsStandardPage"%>
And what kind of file would clsStandardPage be? Just a CS file that declares
a page? I think I follow what you are saying. But if this base page couldn't
handle events from any added controls, it seems like it's use is somewhat
limited.
> I guess you could create clsStandardPage as aspx page and give it a
> ClassName ='clsStandardPage' and inherit from it. But that would be
> overkill. Since there is parsing involved. So better create it as a class
> in APP_CODE.
I might play with that just to better understand what is going on. But
sounds like it won't do what I'd like.
> If you want to reuse HTML on pages then use MasterPage or UserControls.
I already use Master pages. User controls are a possibility. Obviously, I'm
still learning ASP.NET.
Thanks for all the info.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com