| Author |
Topic Search Topic Options
|
eagle00789
Mod Builder Group
Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
MorningZ
Senior Member
Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
pmormr
Senior Member
Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
MadDog
Mod Builder Group
Joined: 01 January 2002
Status: Offline
Points: 3008
|
Post Options
Thanks(0)
Quote Reply
Posted: 11 April 2003 at 3:05pm |
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
|
|
|
 |
eagle00789
Mod Builder Group
Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
|
Post Options
Thanks(0)
Quote Reply
Posted: 11 April 2003 at 4:22pm |
what i realy want is something like
<% Server.Execute("rating.asp?RatingID=1") %>
greetings Chris
|
|
|
 |
MorningZ
Senior Member
Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
eagle00789
Mod Builder Group
Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
|
Post Options
Thanks(0)
Quote Reply
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
|
|
|
 |
TexasJoe
Newbie
Joined: 08 April 2003
Location: United States
Status: Offline
Points: 1
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |