the include file head.asp is located in the includes directory while the ssi its calling is on the adrotator directory. here is the code for the adrotatorhomepage.asp (all relevant files are in the same directory) Code:
I want to be to call my menu from another file onto my page so that i dont have to add it to every page of my website. The problem is when i try to add it using the include method it says that only one include file is allowed on an ASP. The other include file is my connection string so i cant really take that out of the page because then nothing else will work!
How can i get the menu page included as well as the connecting string?
Have added the code below, i have highlighted the 2 include files that i want to use in blue, i have also left the div tag in for where i currently have the menu which is what i want to take out and have ther include file there instead, if that makes sense. Basically the bit in red i want to be able to remove from all of my pages and add the blue file above the red code in instead, but i dont know how!!!!! Code:
<% I am trying to use "set con" in the include file. i used it before with simple text but when I use the connection object it doesn t work. is this possible in asp and what is the problem with the code below:
Can someone advise how can I send an html message that include gif file using cdonts. the gif cannot link to www, or any specific server location. user must be able to view when they open their email.no as attachment.
I have asp page file0.asp which calls another asp page thru include. I have to set conditions tht....
originally the include should have file1.asp In the displayed file file1.asp user selects a hyperlink, it should take it as request and display the new file2.asp in same file0.asp in place of file1.asp.
so i want to display multiple pages on user request inside file0.asp. But originally when file0.asp loads it should have file1.asp. Code:
how to include an asp file into an other asp file with checking condition first.I can do this easily in PHP, but in ASP, it seem that the content of included file is process before it read the code on page.So when I include a asp page into another asp page, I cannot choose which page will be include base on the condition.
When I first started using Server Side Includes I used the regular file include:
Code: <!--#include file = "myfile.asp"--> Then I read where the virtual include is much beter. I figured I would try it out, so on my last project I used all virtual includes:
Code: <!--#include virtual = "/somedirectory/somefile.asp"--> It worked fine and I really couldn't tell any differnce. Maybe a little easier to remember where all the file needed to point to. But this was for a New Site so testing it on the server was easy. I didn't have to worry about existing content up there.
I'm now redesigning a site to add in some dynamic stuff and I always test everything on the server it will reside on to be sure everything will work. Typically I create a "v2" directory and run everything from there. Well this really screws me up when using a virtual include, becuase I would have to edit and then rededit all my file paths.
So my question is... What do you use? And why are file includes so bad?
I'm wondering if there's any way to include a XML file (with a XSL) in a ASP file? I've tried this <!--#include file="publications.xml"--> but the XML-code is included before it is formated according to the XSL and ends up being unformated.
I want to include files, a header and a footer to my asp page. The files i want to include its on another server, i can reach it with a www-url. Can i use the www-url to include the file to asp page?
Im working on a new site and im not using frames, im using #include files. The isse is you cant put a variable into an include file because includes are loaded befor variables and this means that the include dont work...
what ive done is make an include page with a quirystring passing which page i want to load in, then on the included page it looks at the case and when it = 2 for example. it loads whats in case 2 which in this case is <!--#include file="../XtraNET/Forum.asp"-->
trubble is theres 52 menu items, if the site would always have 52 menu items this would be solved, but you can add new ones.. thusly i need to be able to dynamic the code...
My train of thought is can i store the whole <!--#include file="../XtraNET/LiveChat.asp"--> statement in the database and call it within the code dynamicly, like a document.write or somthing.
I just started ASP/ASP.NET two days ago. I would like to know the best way to go about using this include file method to contain my connection string stuff. As I understand it, a connection should only last as long as the query action (unlike VB6 with a persistent connection.) So, what would be the best stuff to put into an include file for my connection stuff so I only have to make one change throughout the ASP/ASP.NET app? Any other experiences with good things to put in that include file? Can I also create the connection object in the include file and use it in multiple pages?
I need to include an asp file from another server.Code:
<!--#include file="SicurezzaDip.asp"--> I think that is the normal way to do it. I've also used the code shown below, but it doesn't seem to work..Is it possible to Include asp files from another server ? How can i do it
I have been avoiding this issue but it keeps popping up and I cannot figure out a solution. Include statements pathed two or more folders deep they break.
This works: <!--#include file="../includes/mo_security.asp" -->
This does not work: <!--#include file="../../includes/mo_security.asp" -->
So basically my site files are limited to one folder deep. Ex: ROOT/parentFolder/files.htm One I move another level down the includes do not work anymore: Ex: ROOT/parentFolder/childFolder/files.htm I am on a Windows IIS server. Is there any solution to this or is it just a limitation of the include statement?
How can I include a .cgi file in an .ASP file? I've tried #include, Server.Transfer, and Server.Execute (yes, I know the last two are only for ASP, but I tried it anyway). If I have to, I guess I'll use ASPHTTP to do an http call to the file but first I wanted to see if there was a more elegant way to do it Is there an efficient way to include the output of a .cgi file in an ASP file?
I've created two separate files that I use as includes to display the header and footer of each page.Everything works fine if the pages that contain the includes remain in the same directory: the root directory. However, I want to use the includes in other places but I can't figure out a good way to solve the problem of the paths that are in the actual include files (path to stylesheet in the header, etc.). Here is my basic directory structure on the web server (I've used "code" to make it easier to read): Code: - root - include header.asp footer.asp + images - misc contact.asp index.asp I want to use the same include files in contact.asp but, obviously, the paths are going to be wrong. I've tried using Server.MapPath in the paths of header.asp and footer.asp so that the includes can be used anywhere in the site but, it is not working.And, I don't want to have the physical path visible in the source code. Is there a function or method I don't know about that can give me a path to the "root"?What have you done if in a similar situation?
how can i include a webpage from another server with ASP? (Without frames) i tried XMLHTTP, but i loose the stylesheet, images src and relative links of the included page.
I've only recently begun using asp so i'm not that good, but my problem is this: The navigation for my site is within an include file. However I have an inlcude navigation file for each section but the only thing that changes from file to file is the name of the section you are in, this seems a bit un-necessary.I.e contact, home, about us etc. Is there a way I can use asp to write the name of the section and so only need one navigation include file?
I want to include files, a header and a footer to my asp page. The files i want to include its on another server, i can reach it with a www-url. Can i use the www-url to include the file to asp page?
I just got a weird error today while using the include statement. I have other includes in the same file but somehow this one does not work.
<!--#include file = "includes/top.asp"-->
This one doesn't:
<!--#include file = "includes/conn.asp"-->
The error returned in my log is: 2007-08-20 01:40:45 222.73.5.35 GET /new/register.asp |29|ASP_0130|Invalid_File_Attribute 80 - 154.5.59.206 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1) 500 0 0
I have written general purpose functions in an .inc file when I include that file using #include to my global.asa I get errors. whats the correct way to include that .inc file in global.asa.
is it possible to pass a varible from the code within a page to the include. for example the include is similar to this.
<% Dim objMail, objConfig, objFields, message message = message & "This is a test page" & vbcrlfWith objMail Set .Configuration = objConfig .To = "you@email.com" .From = "me@email.com" .Subject = "A Request has been Submitted" .TEXTBody = message .Send END With %>
so basically i have a form posting information to another page that inputs the data into a database. I would like to have to include page take the email varible that is posted to the database and pass it into the ".To = Email" line. Where 'Email = "you@email.com"' (taken from 'Email=Request.Form("you@email.com") ')