|
-
Oct 16th, 2001, 11:08 AM
#1
Thread Starter
Frenzied Member
ASP/VBS: Alternatives to #include
Okay, this is very hard to explain, so bare with me.
Currently I have a block in my ASP that looks like this:
Code:
<div class="PanelSpace">
<div class="Panel" id="Panel0">
<!---#include virtual="/test/alpha.inc"-->
</div>
<div class="Panel" id="Panel1">
<!---#include virtual="/test/beta.inc"-->
</div>
<div class="Panel" id="Panel2">
<!---#include virtual="/test/gamma.inc"-->
</div>
<div class="Panel" id="Panel3">
<!---#include virtual="/test/delta.inc"-->
</div>
</div>
I am wanting to create a loop in the ASP that will accomplish the same thing.
Code:
<div class="PanelSpace">
<%
for currPanel = 0 to UBound(PanelNames, 1)
%>
<div class="Panel" id="Panel<%=currPanel%>">
<%'Panels Source .inc file should be accessed here%>
</div>
<%
next 'Panel
%>
</div>
I can't use the #include directive since that will get processed before the ASP will. I've tried Server.Execute, but I need the .inc to be able to use the same embedded ASP techniques that this page is using, and to be able to call on variables defined here.
Any ideas? Any questions?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|