Jump to content
xisto Community
Sign in to follow this  
sachavdk

Including Files In Asp Using

Recommended Posts

I'm making a page (in ASP2.0 with VBScript) wich has to include a file but the path to it is composed.Normally inluding a file is done using<!--#INCLUDE FILE="file.asp"-->But the url to the file is now composed as I said trough some variables:Server.MapPath(conPath & Request.QueryString("p") & "/index.asp")This whole bunch (in an example case the variable should be "./Conten/Main/Home/index.asp" which shoul be included.But how do I include such a variable since next two tries of me didn't work:<!--#INCLUDE FILE=<%=Server.MapPath(conPath & Request.QueryString("p") & "/index.asp")%>-->Neither worked:<% <!--#INCLUDE FILE=Server.MapPath(conPath & Request.QueryString("p") & "/index.asp")--> %>

Share this post


Link to post
Share on other sites

hi, sachavdk as microsoft document said, <!-- #include --> statement should outside of asp code tag as stated in style 1 of you previous post.actually, <!-- include --> statement have two styles:1.) file="path / relative path to file include"2.) virtual = "full path using web style"however, both style are not accept using variables, you must explicit say which and where the include file you want.if you really want it, you may try this:vbscript ==> execute or executeglobaljscript ==> eval- hope this help- Eric

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.