Click to See Complete Forum and Search --> : What does #include virtual="abc.asp" do?
jammer20002
03-25-2004, 05:32 PM
Can someone tell me what #include virtual="abc.asp" does?
And how is it different from #include file="abc.asp"?
(I'm new to ASP and am going through some sample code I found.)
Thanks.
Jam
PeOfEo
03-25-2004, 05:42 PM
its an include. It will parse in the contents of that file on to your site. example use: you have a menu you want to be on all of your pages but you do not want to update each page, you would put the menu code in the other file which can be anything in ascii format (txt html asp inc so on and so fourth) and put that include stuff on there and it will be parsed into your html output.
jammer20002
03-25-2004, 06:50 PM
Thanks for the reply.
I basically got that concept.
What I was confused with was the use of 'virtual' and 'file'.
What's the diffence?
Let me know.
Thanks.
Jam
buntine
03-25-2004, 07:08 PM
file - To indicate a relative path.
virtual - To indicate a virtual path.
Its considered good programming to use the .inc file extension when including files to distinguish them from others.
Regards,
Andrew Buntine.
PeOfEo
03-25-2004, 08:45 PM
virtual would be used if the file is in your virtual directory, file would be used if it is in a real dir. You can put in the full path but it is not neccessay.