Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include page contains a variable
Message
From
23/05/2001 22:35:56
 
 
To
23/05/2001 18:43:45
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00510649
Message ID:
00510697
Views:
11
>In an include page syntax, I have to include a variable. So, this is as close as it shoud be:
>
>
>< !--#INCLUDE FILE=< %=lcUrl%>Page.html-->
>
>
>However, this does not work as a variable can't be processed inside of an INCLUDE command. What syntax can I use?

You can use an 'If..Else...End If' block, or a 'Select Case' statement to include the appropriate file for each possible scenario. It can get cumbersome if you have too many possibilities, though.
< % If condition = "a" Then %>
< !-- #include file=a.html -->
< % ElseIf condition = "b" Then %>
< !-- #include file=b.html -->
...
< % End If %>
Andres M. Chiriboga, MCSE, MCP+I
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform