References in ASPX WITHOUT a WebForms Project

G

Guest

Hi. I really like to develop most of my stuff without havig a Visual Studio
WebForms project. In other words, I largely develop "loose" .ASPX and .CS
files that dynamically compile when appropriate. Everything always works
great.

But here's my problem: If I try to do a <% @ Import Namespace=... %> for
something that doesn't "automatically" get a reference in every ASPX file
(e.g. System..., etc.), it seems like there's no way to use the Namespace
from the ASPX file.

Am I wrong? Is there a directive that can be included INSIDE a .ASPX file or
its Code-Behind .CS file which will cause the proper Assembly to be made
available during automatic compilation? Or does this mean that I would have
to force these Assemblies into the GAC to achieve this?

Particular example is the use of the MS Office Automation objects from ASPX
(I know it's not recommeded) from an ASPX file that's not part of a "Project".

Thanks for your help.


Alex
 
K

Ken Cox [Microsoft MVP]

Hi Alex,

Web Matrix doesn't use a project, so that might be a good tool for ensuring
that you get all the parts you need.

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top