Jul 20, 2008

Including Files In Asp - Using

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > .NET ( ASP.net VB.net )

free web hosting

Including Files In Asp - Using

sachavdk
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")--> %>

Reply

magiccode9
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 executeglobal
jscript ==> eval

- hope this help
- Eric

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : including, files, asp

  1. Best Way To Transfer Files
    I just bought a laptop (6)
  2. 1350 Great Free Logos (jpg + Psd)
    With both jpg and original psd files to edit (6)
    1350 Great Free Logos (With both jpg and psd files)
    http://rapidshare.com/files/126291346/1346...Great.Logos.zip This is a great collection of
    logos, they are already made logos which you can use like that or just use to create other logos, do
    what you want, they are free, they came from free websites that give this logos for free and lot
    more, but i just took the good ones mainly. There is also a small collection of 100 logos inside
    the compressed file, which you can use to insert those graphics in your logo/design/web design
    projects, do what you want with them ....
  3. Mp3 (compressed Digital Audio Including Aac, Mp3 And Such) Vs Cd Vs Tape Vs Vinyl
    (3)
    Vinyl is sexy. its good Quality (when properly cared for), and its just feels good holding and
    listening to it. I really don't know how else to explain it. Vinyl is sexy, it feels it and it
    sounds it. I'm talking the audiophile, the sound tech/engineer with the well trained ears, that
    can hear how full and rich an old vinyl record sounds and feels. I mean it feels good to hold 11
    inches of a big black licorice pizza (record) Analogue Tape (domestic)... cassette is ok, it lacks
    quality mainly because it is at such a low speed, the higher the speed the better the ....
  4. Debug Exe Files
    How to debug an exe file. (4)
    Think that we have written a program, and some codes are wrong. We can go back to compiler and
    change the code, and compile again. But I will show you how to correct our mistakes without using
    the compiler. Let's start: I have written a program in Delphi. Let's see my mistake. I
    have created a form like this. After this I wrote the codes in the Compare Button click as
    below. CODE 1.   procedure TForm1.ComparebuttonClick(Sender: TObject); 2.   var
    3.     a,b:integer; 4.   begin 5.     a := StrToInt(EditA.Text); 6.     b :....
  5. Mysql
    Several files in one field. (2)
    Hi guys. I want t know if it is posible to have so many entries for one object in a field in MySQL.
    I know my question may not be clear because I lack in terminology but pliz try and help. What I want
    to do is for axample have a database of my clients with the following fields for every client:
    fname, lname, more than one photos, contrubutions(comments, jokes, testimonials posted) etc. I want
    to have the things like the photos in the same field but they have to be unique so that my php code
    can deal with them individually llike they are coming from different fields.....
  6. Converting Audio Files In Vista
    how do you do it? (7)
    Ok, so I have some .wav files that I'd like converted into .mp3. I knew how to do it in XP, but
    I can't find windows audio converter in Vista....does vista even have that, or is it under a new
    name? Also, is it possible to convert video files, like .flv into .avi?....
  7. Search For Video Files And Display Them
    Using a batch file in windows (0)
    In windows you need to be able to see the file's extension so you can rename a .txt file to .bat
    This batch code I wrote searches your C:\ drive for video files and drops the results into a
    file. That file is then processed into links on a web-page. The web-page is then opened for you to
    view. Click the links to view the file, right click -> save as to save to another place on your
    computer. I use it a lot after browsing videos on the web. It's fun to see what videos end up
    cached (left on the computer from browsing) Insert this into a file named vid-searc....
  8. Deleted Some Important Files In Your Usb/ Mem Stick?
    (1)
    if you did then use a file recovery program. there are recovery programs unique to your brand like
    sony's recovery program for their memory sticks. i have heard so many people just pity
    themselves because of this one.....
  9. Acessing Files In Mac Os X
    How to access your files from a different machine? (0)
    I have a mac book pro and an imac at home. I have accounts of user 'sone' on both machines
    and I scan most of my on the imac and it gets saved automatically in my home/pictures folder. I know
    its not shared by default here but is there any way I can be able to mount that folder or even give
    access to myself from my macbook pro to it? It would save a lot of tedious steps to share it other
    wise i.e copying it to another shared folder. Any information much appreciated thank you. ***** OK
    never mind I just learned I can do it easily enough. OS X already provided ac....
  10. Need Some Help In File Browser
    listing all sub folders and files in them. (8)
    Hey I want to create a very simple file browser, so that, it reads all the sub-folders which are
    places in a directory, and the files inside the sub-folders (It reads only files inside sub-folders
    and list them in simply. ) Also, it creates a directory (any name) inside each sub folder. My
    Following code reads on the files inside the main directory, it does not read the files inside the
    sub-folders.. I appreciate any help. CODE <? $path = "./"; $dir_handle =
    @opendir($path) or die("Unable to open $path"); whil....
  11. Save Youtube Files
    (21)
    Hi, I'm running a tool called MelodyCan for my Napster library and recently discovered 1 perfect
    feature - YouTube downloader! It allows to download YouTube videos from the site and convert to
    various video formats. Install the trial version from http://www.convert-any-media.com/ and go to
    your Internet Explorer. All you need is to load Youtube page with a video clip and click on "Save
    Youtube video" button or something like that.. and the clip will be saved to the desired location
    /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"....
  12. Download Files Off Esnips.com
    even now that the download button is gone! (0)
    hey everyone, i am sure that many of you may have heard of esnips , which is basically online file
    storage/sharing. you can now find almost any file imaginable on esnips, and in many ways it is
    better than rapidshare. previously, once you are signed in to esnips, you were able to download any
    esnips file via a button only viewable to members. back then, there was a method to download any
    file without even signing in. then, probably due to legal issues, users were able to choose whether
    or not people could download their files. the hack mentioned above, though, still....
  13. Download Script For Mp3 Files
    (0)
    Hello, I'm looking for a download script for sound files (e.g. mp3, avi, wma, and other ones).
    i have found a few download scripts but they would not work for sound files for some reason. also
    this will not be used for allowing downloading of illegal or riped music, what i will be using this
    script for is i'm making a site for my church and the pastor wants to be able to recored the
    services and then have me upload them to the site so that the church members can download them for
    what ever reason. If some one could tell me how to make one or could show me a plac....
  14. Freeware Game Files
    My topic for free games to d/l (1)
    All free games on sites should be posted here no virus/spyware here /rolleyes.gif"
    style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> this is for those
    who can make free games and want to give them to the community /ph34r.gif"
    style="vertical-align:middle" emoid=":ph34r:" border="0" alt="ph34r.gif" />....
  15. Sharing Files And Printer Between Windows Vista And Xp
    Networking Problem (8)
    I have set up a wireless network between my two computers one vista and one XP I can access the
    shared files from the vista machine on the XP PC but I cannot access the shared files or printer
    which are on the XP PC via the vista one I don' think it is a firewall issue. Can anyone help
    please it is driving me mad?? /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0"
    alt="biggrin.gif" />....
  16. How To Disable "show Hidden Files And Folders" In Folder Option
    (11)
    How to disable "Show hidden files and folders" in Folder Option As you know, you can hide files
    or folders in Microsoft Windows ( to hide a file or folder , right click on file or folder >select
    properties and then select Hide file) But if you open Folder Option and check "Show hidden files
    and folders " you can see hidden files. to disable "Show hidden files and folders" feature follow
    below steps : 1- Click start > Run > type regedit to run Windows Registry Editor. 2- Go to following
    address: QUOTE HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/Current Versio....
  17. Informix To Sql Server (or How To Open .unl Files)
    how to import .unl files into SQL Server 2000 without Informix softwar (2)
    Does anyone know how to import .unl files into SQLServer 2000? My boss gave me this task to migrate
    an old database into SQLServer. I don't have informix installed since the files were sent to me
    via email. All files have .unl extension and I don't have a clue how to view them. I've
    tried opening them using excel but it can't be read. Does anyone know how to do this? Or at
    least know how to open/view the file using excel or any other program that could be easily migrated
    to sqlserver? Please, I need to migrate the files as soon as possible. Thanks....
  18. Delete A Bunch Of Files Using Dos Statement
    DOS Delete Command (4)
    when we are running a program.they usually create many files that we don't need.Anyone knows the
    dos commands that we can delete those file at once?if you know could you please tell me that.thanks
    Edit title for spelling error. ....
  19. Software That Will Convert .cue/.bin Files To A Different Format Like .avi
    (10)
    Ok, well recently i downloaded a little snippet of somthing that i couldn't find anywhere else,
    and i wish i could have found it somewhere else because the snippet is in .cue/.bin video image
    format.. and that is not exactly what i want... i know how to play it, i used VLC media player to
    play the file, but now i want to write it to a CD but i do not want to keep VLC media player on my
    computer or install it on any computer i want to play this file on... so i was hoping to convert
    icue/.bin files to somthing like what the rest of what i have is which is .avi i h....
  20. Flatfile User Login/signup
    Uses text files only (compatable with forums and message system) (24)
    With this tutorial, you will learn how to create a textfile login script. This user membership
    script is for use also with my forums and message system scripts. I will also give you the scripts
    to make it so that people can change their profiles. Ok, The first thing we need to do is make the
    database. To do this, create a blank text file called 'userdata.txt' , make sure it is ALL
    LOWER-CASE. Edit this file and put
    '**username|##|password|##|email|##|rank|##|userid|##|name|##|picture**'. This will not be
    used, however it will give you an idea of how the....
  21. Strange .log Files On My Desktop
    (10)
    Since this morning, two new visitors has camped out on my desktop. One is lcapi0.log , & when you
    open it you get: QUOTE 19:50:36.703 F20:F24 WARN :: module=lcapi flavor=fre
    version=1.7.226.0 (RTC Version 4.3.5371.0) 19:50:38.109 F20:F24 INFO :: Initialize(0) 19:50:38.609
    F20:F24 INFO :: MUI not Enabled 19:50:44.625 F20:F24 INFO :: SetDeviceDisabled 0->0 19:50:44.656
    F20:F24 INFO :: SetDeviceDisabled 0->1 19:50:44.656 F20:F24 TRACE :: SetDevice 00000000->00000000
    19:50:44.656 F20:F24 INFO :: SetDeviceDisabled 0->0 19:50:44.656 F20:F24 TRACE :: SetDevic....
  22. Linux Question: Amarok And File Permissions
    please help, i can't get it to work with all music files (4)
    hey, i use to use Linux DC++ to download music from some hubs and i usually download it to
    /home/downloads/ and then i move the files to my collection on another HDD a sata one, on
    sda3/music/ but when i move the files using krushader root mode they become posessed by root and
    amarok can't play them displaying a locker on the file's icon. I tried to " chmod 774 music
    ", where music is my music directory, as root in konsole but no luck. What should i do to make a
    whole directory accessible from amarok as user?....
  23. Files With Mdf Extension
    how to open them (6)
    please transfer this topic to a subforum if this isn't the appropriate subforum. i can't
    seem to find one that might fit this topic. thanks i have downloaded a file from a torrent client
    along with other files. i'm trying to figure out if the mdf file is the rip from the dvd that
    i'm looking for. the problem is i don't know how to open it(the mdf file). i've looked
    through the net and it says that i should use ISOBuster. i've tried it but i don't know
    exactly the steps on extracting the files on the mdf file. any help would be appreciate....
  24. The Icons Of Zip Files Are Wrong Everytime!
    Windows 2000 (3)
    Hello! I am going crazy for a silly little thing. Please help me anyone! The icon for
    ZIP files never shows the way it is supposed to. Instead it insists on displaying the Windows
    'default document' icon for ZIP files. If I rightclick a zip and choose icon properties, I
    can set the icon to be fetched from the winzip executable instead, and all looks fine and dandy
    inside the properties dialog, but after refreshing or repairing icon cache it is still the default
    document icon that is displayed. If I try to change the icon enough times it will ev....
  25. Delete Files And Directories Using Php
    following up from creating and writing (7)
    How To Delete Files and Directories follow up from creating them Hello all and
    welcome to my second tutorial involving file management. In my previous tutorial , I explained how
    to create, write and read files. In this tutorial I'll explain how to remove the files and
    directories you took so long to create. I did not explain last time how to create directories as I
    did not know, now I do, you can use the mkdir() function. Now with this tutorial.... Removing
    Files Removing files can easily be done with the unlink() function: CODE <? un....
  26. Css And Javascript Combined For Dynamic Layout
    use of different CSS files at same site (9)
    This tutorial is meant for people that are dealing with problems while coding their site at 100% of
    width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
    file (take this in account when creating your website). How this script works. In the HEAD of your
    HTML document will apply this command, so variable.js file will be load at start: CODE
    <script type="text/javascript" src="variable.js"></script> In
    browser JavaScript file variable.js is loaded. This Javascript file consist of this para....
  27. Does Anyone Know How To Make Exe Files
    (17)
    Does anyone know any software for making exe files, I want to make simple programs not propper
    one's. Thanks.....
  28. Defragment: Cannot Defrag All Fragmented Files
    What can I do about this? (9)
    This is what I get after I defrag, "all files could not be defragged". I think this is slowing
    down my computer, so what can I do? I have a couple movies on my hard drive that are about 700MB
    and 900MB. Does this have something to do with this big red area? Thanks.....
  29. Getting List Of Directories And Files Using Php
    PHP Function for Directory and File List (6)
    is there a php function that lists the content of some folder.... example: /New folder new.txt
    left.gif download.zip dc.exe ....so is there..? /rolleyes.gif' border='0'
    style='vertical-align:middle' alt='rolleyes.gif' /> ....
  30. Converting Video Files From One Format To Another
    help plz :) (6)
    hey i have learnt this nice way to open mov files in imageready and insert them in sigs,graphics and
    other stuff its really cool,this only works with .mov files and i really need to know if sumone here
    can do that,i need to change a wmv file into a .mov file so i cant add the movie to a sig,i have
    tried many video format conversion programs but they dont accept the mov format,the mov format is a
    quicktime video format,so anyone here know how to change a video file into a quicktime mov video
    format? thnx in advance....

    1. Looking for including, files, asp

Searching Video's for including, files, asp
Similar
Best Way To
Transfer
Files - I
just bought
a laptop
1350 Great
Free Logos
(jpg + Psd)
- With both
jpg and
original psd
files to
edit
Mp3
(compressed
Digital
Audio
Including
Aac, Mp3 And
Such) Vs Cd
Vs Tape Vs
Vinyl
Debug Exe
Files - How
to debug an
exe file.
Mysql -
Several
files in one
field.
Converting
Audio Files
In Vista -
how do you
do it?
Search For
Video Files
And Display
Them - Using
a batch file
in windows
Deleted Some
Important
Files In
Your Usb/
Mem Stick?
Acessing
Files In Mac
Os X - How
to access
your files
from a
different
machine?
Need Some
Help In File
Browser -
listing all
sub folders
and files in
them.
Save Youtube
Files
Download
Files Off
Esnips.com -
even now
that the
download
button is
gone!
Download
Script For
Mp3 Files
Freeware
Game Files -
My topic for
free games
to d/l
Sharing
Files And
Printer
Between
Windows
Vista And Xp
- Networking
Problem
How To
Disable
"show
Hidden Files
And
Folders"
; In Folder
Option
Informix To
Sql Server
(or How To
Open .unl
Files) - how
to import
.unl files
into SQL
Server 2000
without
Informix
softwar
Delete A
Bunch Of
Files Using
Dos
Statement -
DOS Delete
Command
Software
That Will
Convert
.cue/.bin
Files To A
Different
Format Like
.avi
Flatfile
User
Login/signup
- Uses text
files only
(compatable
with forums
and message
system)
Strange .log
Files On My
Desktop
Linux
Question:
Amarok And
File
Permissions
- please
help, i
can't
get it to
work with
all music
files
Files With
Mdf
Extension -
how to open
them
The Icons Of
Zip Files
Are Wrong
Everytime
3; - Windows
2000
Delete Files
And
Directories
Using Php -
following up
from
creating and
writing
Css And
Javascript
Combined For
Dynamic
Layout - use
of different
CSS files at
same site
Does Anyone
Know How To
Make Exe
Files
Defragment:
Cannot
Defrag All
Fragmented
Files - What
can I do
about this?
Getting List
Of
Directories
And Files
Using Php -
PHP Function
for
Directory
and File
List
Converting
Video Files
From One
Format To
Another -
help plz :)
advertisement



Including Files In Asp - Using



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE