P
PeterKellner
I'm trying to understand how asp.net 2.0 ties together the codebehind.
I've made a simple page, turned debug on so the *0.cs,*1.cs,*2.cs
files don't get erased.
My first point of confusion is that the *1.cs file is declared like
this:
public partial class _Default : System.Web.UI.Page
{...
And the *0.cs file is declared like this:
public partial class _Default :
System.Web.SessionState.IRequiresSessionState {
I'm thinking they are both partial classes of the same thing yet they
derive from different base classes. I thought partial classes had to
derive from the same base class?
My second point of confusion is about the page class itself. I'm
assuming there is only one page class per aspx page, and in my
example, it's name is default_aspx.
public class default_aspx : global::_Default, System.Web.IHttpHandler
{
This to me says that default_aspx (the one page class that controls
the page) derives from _Default and implements the interface
IHttpHandler. My confusion is that if _Default already implements
System.Web.UI.Page, why does default_aspx have to implement it also?
Just trying to understand. Thanks for reading.
Peter Kellner
http://peterkellner.net
I've made a simple page, turned debug on so the *0.cs,*1.cs,*2.cs
files don't get erased.
My first point of confusion is that the *1.cs file is declared like
this:
public partial class _Default : System.Web.UI.Page
{...
And the *0.cs file is declared like this:
public partial class _Default :
System.Web.SessionState.IRequiresSessionState {
I'm thinking they are both partial classes of the same thing yet they
derive from different base classes. I thought partial classes had to
derive from the same base class?
My second point of confusion is about the page class itself. I'm
assuming there is only one page class per aspx page, and in my
example, it's name is default_aspx.
public class default_aspx : global::_Default, System.Web.IHttpHandler
{
This to me says that default_aspx (the one page class that controls
the page) derives from _Default and implements the interface
IHttpHandler. My confusion is that if _Default already implements
System.Web.UI.Page, why does default_aspx have to implement it also?
Just trying to understand. Thanks for reading.
Peter Kellner
http://peterkellner.net