Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - dynamic includes??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

dynamic includes??

 Post Reply Post Reply
Author
Boecky View Drop Down
Groupie
Groupie
Avatar

Joined: 23 December 2002
Location: Belgium
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boecky Quote  Post ReplyReply Direct Link To This Post Topic: dynamic includes??
    Posted: 23 June 2003 at 7:40am

Yes, I know I'm not the first one that asking this. But I'm looking for some clear answers...

This script will not work for sure:
<%
fname="header.inc"
%>
<!--#include file="<%=fname%>"-->

But can anyone tell me what I can use for get the same result?
something with if...then or select case? Or does someone has an other solution? I need it coz I don't want to make many pages if I can do it with 1 page and a few includes...any ideas? Thanks

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2003 at 7:55am

<%
fname="header.inc"

Server.Execute(fname)
%>

That will work

Back to Top
Boecky View Drop Down
Groupie
Groupie
Avatar

Joined: 23 December 2002
Location: Belgium
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boecky Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2003 at 1:58am
And what are the differences between Server.Execute and the include file?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2003 at 2:06am

<%
If fname="header.inc" Then
%>
<!--#include fileheader.inc"-->
<%

End If
%>


Back to Top
Boecky View Drop Down
Groupie
Groupie
Avatar

Joined: 23 December 2002
Location: Belgium
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boecky Quote  Post ReplyReply Direct Link To This Post Posted: 24 June 2003 at 3:19am
Am I right if I want to work with this that I always have to make many If...then or Case Select statements? Or is using dynamic includes not really the correct way of programming in asp?
Back to Top
Boecky View Drop Down
Groupie
Groupie
Avatar

Joined: 23 December 2002
Location: Belgium
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boecky Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2003 at 12:08am
What I mean actually, is I just want to know if somebody use this kind of "dynamic" includes?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.