Conditional Compilation Directives in aspx file?

P

Praveen Ramesh

Hi,

Is there some kind of support for "Conditional Compilation Directives" in
the aspx file?

I want to enclose the Register tag as follows:
#if DOTNET10
<%@ Register TagPrefix="sfwg" Namespace="CustomNameSpace"
Assembly="CustomAssembly1.0"%>
#else
<%@ Register TagPrefix="sfwg" Namespace="CustomNameSpace"
Assembly="CustomAssembly1.1"%>
#endif

And of course be able to define the "DOTNET10" directive somewhere (maybe in
the web.config file).

TIA,
Praveen
 
S

Steven Cheng[MSFT]

Thanks for Brock's inputs.

Hi Praveen,

So far there hasn't any conditional compilation directives in asp.net's
aspx page. And as for assembly's version redirect, .net has the formal
means through the assembly redirecting /binding configuration. And the
version redirection is actually a runtime behavior which occur at the
loading time of a certain assembly. Also, that assembly must be
strong-named so as to take advantage of the version redirections. Here are
some further resource on .net's assembly version redirection:

#How the Runtime Locates Assemblies
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconhowruntimelocatesa
ssemblies.asp?frame=true

#Side-by-Side Execution Overview
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconSide-by-SideExecutionOverview.asp

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top