Re: custom namespaces
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 11:57:23 -0400
Hi, Matt.
Take a look at :
http://www.asp101.com/articles/john/codebehindnovs/default.asp
If you look at the code in WebForm2.aspx.vb as your codebehind,
but use the Page statement in WebForm3.aspx, you'll have
the answer to your question.
In essence, to use code-behind, you can :
1. use the Visual Studio model
2. compile the code-behind to an assembly and reference it in the aspx
3. use the Src and Inherits properties :
<%@ Page Language="vb" AutoEventWireup="false" Src="WebForm2.aspx.vb"
Inherits="WebForm2"%>
This last one is your answer. Adapt it to your needs.
You will be able to call any class, property or method by using Src,
just like if you were using an actual assembly.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Matt Jensen" <replytonewsgroups@xxxxxxxxxxxxx> wrote in message
news:%23atN3JNpFHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
> Howdy
> Relatively new to .NET, I'm trying to create custom a namespace for use in creating some
> utility classes, which I seem to have done OK, however, I'm having a problem trying to
> use the class with the error the namespace can't be found.
>
> I've really got no idea what I'm doing, I'm coding in C# and essentially using notepad,
> and trying to get my code behind file to use the class in my custom namespace.
>
> I'm guessing the problem is that I haven't compiled my namespace into a dll, but I don't
> have access to the command line compiler on the network PC here which doesn't help, nor
> Visual Studio.
>
> I've been told I somehow need to add a reference to my namespace if I was using Visual
> Studio, but I don't have it, nor a command line compiler. Is it possible without these?
>
> Basically, I'm looking for an article that is entitled "how to create and reference your
> own namespaces without visual studio".
> I've tried putting my code behind and .cs file with my namespace in the bin directory to
> no avail.
>
> Any tips greatly appreciated
> Cheers
> Matt
>
.
- Follow-Ups:
- Re: custom namespaces
- From: Matt Jensen
- Re: custom namespaces
- References:
- custom namespaces
- From: Matt Jensen
- custom namespaces
- Prev by Date: how to set the width of columns in edit mode.
- Next by Date: Re: 2D array
- Previous by thread: custom namespaces
- Next by thread: Re: custom namespaces
- Index(es):
Relevant Pages
|