Conditional Compilation Directives in aspx file?

  • Thread starter Thread starter Praveen Ramesh
  • Start date Start date
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
 
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.)
 
Back
Top