Re: common custom classes
From: John M Deal (johndeal_at_necessitysoftware.com)
Date: 12/05/04
- Next message: **ham: "Re: Help; "Web server is not running ASP.NET version 1.1.""
- Previous message: Tony: "common custom classes"
- In reply to: Tony: "common custom classes"
- Next in thread: Tony: "Re: common custom classes"
- Reply: Tony: "Re: common custom classes"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 05 Dec 2004 09:03:04 -0800
If the file containing the common classes is in the same project but has
a different namespace you can simply put a using (C#) or Imports(VB.Net)
statement at the top of the code behind class:
using The.Other.Namespace; //This is for C#
or
Imports The.Other.Namespace 'This is for VB.Net
If the file containing the other classes is in another project/assembly,
you'll also need to set a reference to the DLL that contains the class.
Hope that helps.
Have A Better One!
John M Deal, MCP
Necessity Software
Tony wrote:
> I have created a few pages in asp.net with in line code and have decided
> to convert them to use code behind pages. I have some classes that are
> common to more than one page. How do I add a namespace to my code behind,
> so I can have one file with my code behind that includes a reference to a
> file with my common classes in it?
>
> Thanks
>
> Tony
- Next message: **ham: "Re: Help; "Web server is not running ASP.NET version 1.1.""
- Previous message: Tony: "common custom classes"
- In reply to: Tony: "common custom classes"
- Next in thread: Tony: "Re: common custom classes"
- Reply: Tony: "Re: common custom classes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|