Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Include file
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Include file

 Post Reply Post Reply Page  12>
Author
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Topic: Include file
    Posted: 10 April 2003 at 8:53am

I have created an asp-page. that page has to be included in another asp-page. the file that has to be included needs to get some parameters. how do i do that

i tried <!--#include file="rating.asp?RatingID=1" --> but it doesn't work

Using forum at Gravenrode and here and here
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2003 at 12:23pm
thats not possible to do...

every file has its own code, but when it comes time to run it, the server first takes all the files and dumps them into one "big" page.. then processes the script... so any include file sees the same variables, the same form items, the same URL parameters, same session, etc, etc
Contribute to the working anarchy we fondly call the Internet
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2003 at 2:59pm

speaking of that is it possible to use a variable as your include? something like

< !-- #include virtual="/mydirectory/mysubdirectory/<%myvariable%>" -->

Thanks,
Paul Morgan
Webmaster



Edited by pmormr
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2003 at 3:05pm
Originally posted by pmormr pmormr wrote:

< !-- #include virtual="/mydirectory/mysubdirectory/<%myvariable%>" -->

No. Includes are processed before asp, so that would just fail.

If you wanted to do an include with asp in it you would have to do this:
<% Server.Execute("/mydirectory/mysubdirectory/" & myvariable) %>



Edited by MadDog
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2003 at 4:22pm

what i realy want is something like

<% Server.Execute("rating.asp?RatingID=1") %>

greetings Chris

Using forum at Gravenrode and here and here
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2003 at 5:10am
you cannot do that as already said (twice)

id "Rating=1" is a URL parameter already in the address line, that either Server.Execute or <!--#include--> will have access to it...

otherwise, you'll have to give more details of your code for further help
Contribute to the working anarchy we fondly call the Internet
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2003 at 2:41pm

what i a trying to do is to get some data from a database. the data is captured from another file. and thru the RatingID i try to get that data from that file. just look at the bottom of the post in this link for the complete code http://forums.webwiz.net/forum_posts.asp?TID=1708&PN=2

greetings chris



Edited by eagle00789
Using forum at Gravenrode and here and here
Back to Top
TexasJoe View Drop Down
Newbie
Newbie


Joined: 08 April 2003
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote TexasJoe Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2003 at 4:29pm

It seems like to me you could set a cookie or a session variable before you include the file.  If You can set RatingID Then call it in the include file.

Just a suggestion.

Back to Top
 Post Reply Post Reply Page  12>

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.