Re: custom namespaces
- From: "Matt Jensen" <replytonewsgroups@xxxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 17:12:50 +0100
Thanks Juan, but I'm already doing that... - what I need to do is access the
classes in my own custom *namespace* which is essentially in it's own
*standalone* cs (utility) file, and for which I think I must need to compile
it so that the code behind can actually see/find reference to the custom
namespace...
Matt
"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:O%230RwaNpFHA.1464@xxxxxxxxxxxxxxxxxxxxxxx
> 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: Juan T. Llibre
- Re: custom namespaces
- References:
- custom namespaces
- From: Matt Jensen
- Re: custom namespaces
- From: Juan T. Llibre
- custom namespaces
- Prev by Date: Re: Debugging in asp.net - NOT WORKING???
- Next by Date: Response.Redirect gens ThreadAbortException that's either not being caught or thrown a second time.
- Previous by thread: Re: custom namespaces
- Next by thread: Re: custom namespaces
- Index(es):
Relevant Pages
|