Re: Reuse code on multiple pages of project

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



re:
> If you use Visual Studio it will do the compile for you and place it in the bin
> directory AFAIK.

Not if the source code file is in the bin directory, and only if
ASP.NET 2.0 is being used *and* the source code is dropped
in the App_Code dir, as you point out.




Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"tom pester" <Tom.PesterDELETETHISSS@xxxxxxxxxx> wrote in message
news:a1a977a213f4ed8c78080725abd04@xxxxxxxxxxxxxxxxxxxxx
>
> If you use Visual Studio it will do the compile for you and place it in the bin
> directory AFAIK.
>
> If you are able to make the swithc to asp.net version 2 I suggest you make it cause it
> makes these things easier:
> drop the class file in the App_Code folder and after importing the namespace you are
> ready to go.
>
> Cheers,
> Tom Pester
>
>> re:
>>
>>> Is there a way one can include a class file (no assembly),
>>> let it be JIT compiled and referenced from a code behind file,
>>> which is also JIT compiled using the src-attribute on the
>>> @page directive?


>> Short answer : no.
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> ASP.NET FAQ : http://asp.net.do/faq/
>> =============================
>> "Manso" <Manso@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:0E7141CA-4148-40D7-94C8-E3D92D02CB96@xxxxxxxxxxxxxxxx
>>
>>> Alright, I got a bit confused (in an earlier posting you wrote that
>>> the class file gets compiled after a drop in the bin dir, which was
>>> all new to me). So, back to square one. Is there a way one can
>>> include a class file (no assembly), let it be JIT compiled and
>>> referenced from a code behind file, which is also JIT compiled using
>>> the src-attribute on the @page directive?
>>>
>>> Hope you get what I'm trying to do here. It can be done using the
>>> "@assembly src" directive in an aspx/ascx file so perhaps there might
>>> be a non-declarative way of doing it?
>>>
>>> Thanks in advance.
>>> Manso
>>> "tom pester" wrote:

>>>>> It should get compiled by default when dropping it in bin,
>>>>> shouldn't it? Have you tried and know that it works? I can't see
>>>>> how it can work. Example:
>>>>>
>>>> No it's not compiled by default in asp.net v1.
>>>> (in asp.net v2 there is a special dir app_code that does what you
>>>> describe).
>>>> Let me know if it helped you or not...
>>>>
>>>> Cheers,
>>>> Tom Pester


.



Relevant Pages

  • Re: Where to place class file
    ... It said you can place the compiled assembly in the bin folder, and other code anywhere in the Web application automatically references it. ... when I compile the component and add it to the bin directy and build the project it bombs out until I manually add the reference. ... Public Property ExportType() As AppType ... Now When I compile it and place the dll in the bin and remove the class file from the root it doesn't work until I also manually add a reference to it in References. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I import a user defined class into VisualStudio .net J#
    ... > I'm using Visual Studio .NET with J#. ... > windowyou get a class file. ... > One example if you have a java file called Test.java and you compile this ...
    (microsoft.public.dotnet.vjsharp)
  • Re: Alternative to JVM
    ... compile class file, but can run Java program with help of a different ... language grammer tree to a 2-address / 3-address instruction set. ... class file from Parse Tree directly. ...
    (comp.lang.java.machine)
  • Re: Checksum with no creation date
    ... old or new version of JavaC. ... it is necessary to do a clean compile to propagate new values ... class file format, and optionally skipped that embedded date. ... Are you using ANT? ...
    (comp.lang.java.help)
  • Version problem causing issues after removal
    ... specific class file to add our edits into. ... Recently we compiled our java class file with java 1.6. ... compile with 1.4.2 since our users are still on that level of java on ...
    (comp.lang.java.programmer)