J
John Spiegel
Hi all,
I'm working with the .NET framework and Web Matrix and am having trouble
finding how to tie together the files when deriving classes. What I've got
is a TestBase.cs file that defines a class derived from page. I also have a
codebehind file that I'm referencing from an ASP.NET page. For example,
something like:
Test.aspx...
<%@ Page Language="C#" Src="Test.aspx.cs"
Inherits="Test.Welcome.WelcomePage" %>
/* Test.aspx.cs */
namespace Test.Welcome
{
using Test.HelperStuff
public class WelcomePage : LabeledPage
{
protected void Page_Load(object Src, EventArgs e)
{ /* Some code */ }
}
}
/* TestBase.cs */
namespace Test.HelperStuff
{
using System.WebForms
using System.WebForms.UI
class LabeledPage : Page
{
protected void DoSomething()
{ /* Some Other Code */ }
}
}
If I'm just building a C# app, I'd compile an exe referencing not only my
main file but any other .cs files it uses. How do I do the analogous thing
in ASP.NET?
To paraphrase a friend: "Please note: I am not as irretrievably stupid as
this post makes me appear.", but am starting to feel that way!
TIA,
John
I'm working with the .NET framework and Web Matrix and am having trouble
finding how to tie together the files when deriving classes. What I've got
is a TestBase.cs file that defines a class derived from page. I also have a
codebehind file that I'm referencing from an ASP.NET page. For example,
something like:
Test.aspx...
<%@ Page Language="C#" Src="Test.aspx.cs"
Inherits="Test.Welcome.WelcomePage" %>
/* Test.aspx.cs */
namespace Test.Welcome
{
using Test.HelperStuff
public class WelcomePage : LabeledPage
{
protected void Page_Load(object Src, EventArgs e)
{ /* Some code */ }
}
}
/* TestBase.cs */
namespace Test.HelperStuff
{
using System.WebForms
using System.WebForms.UI
class LabeledPage : Page
{
protected void DoSomething()
{ /* Some Other Code */ }
}
}
If I'm just building a C# app, I'd compile an exe referencing not only my
main file but any other .cs files it uses. How do I do the analogous thing
in ASP.NET?
To paraphrase a friend: "Please note: I am not as irretrievably stupid as
this post makes me appear.", but am starting to feel that way!
TIA,
John