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.
View Replies
View Related
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?
View Replies
View Related
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
Code:
<!--#include file="http://81.74.60.30/Asp/SicurezzaDip.asp"-->
View Replies
View Related
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?
View Replies
View Related
if it's possible to have a select tag in an include file which is to be included into an ASP page?I have an include file which renders a popup screen. The screen has text
fields i.e <input type="text"> fields which gets input from the user. I want to change one of the fields to a ddl and the field will not show up.code:
<select> <option value="">Choose One</select>
As you can see its the most basic of code, but it doesn't show up on the screen. When I change the code to a text field it does.
View Replies
View Related
I've tried both methods of using include files VIRTUAL= and FILE= when I use the VIRTUAL include I receive the error:
Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file 'ProductList.asp' was not found.
and when I use a FILE include the page just produces nothing the regular page script runs so I know the asp is working but the include files just produce nothing. which leads me to believe something is wrong with my settings in IIS. Im running IIS on Windows 2000.
View Replies
View Related
I have a main ASP file that does common page processing and is included in
my data access pages, i.e.
UserDetail.asp has PageProcessor.asp included in it.
When developing, and I have to make changes to the PageProcessor.asp file,
those changes are not seen by IE 6. The PageProcessor.asp page is being
cached.
Tried setting content expiry to expire immediately in IIS. Also tried
setting IE6 to check for new page everytime.
My only work around right now is to rename the PageProcessor.asp file,
refresh the UserDetail.asp page in IE to get an error that it cannot find
PageProcessor.asp, then rename it back and refresh the page again. Then it
works. As you can image this is very frustrating and severly slows down the
development process.
View Replies
View Related
I need to convert asp to excel. I figured out how to do this but the problem is I use include files for my database connections.
If I leave the files the page will query but will not fire excel. When I declare the functions on the page it works fine. Is there a way that I can use my include files?
View Replies
View Related
Is there any limit to include files (<!--#include file="xyz.asp"-->).
I have developed an application where I am including different files on the
base of diffirent conditions and values and getting error at certain stage.
error is
Microsoft VBScript runtime (0x800A0006)
Overflow: '[number: 32768]'
Before I thought its due to some if or case statements and now I just
removed the line where I am including the file and its working.
I will be very thankfull if some one tell me if there is any limit of
include files so I will bring my code to parent files.
or is there anything else
View Replies
View Related
anyone know the difference between these 3 include
statements?
<!--#include file="folderA/file1.asp"-->
<!--#include virtual="/folderA/file2.asp"-->
<!--#include virtual="../folderA/file3.asp"-->
View Replies
View Related
Possible? It seems nobody knows how...
View Replies
View Related
Can I include asp files dynamically? If the result is 1 then include file 1.asp, if the result is 2 then include file 2.asp, Can this be done?
View Replies
View Related
I'm going to revamp an intranet for a company... which need further maintanence in the future but I got a doubt.Should I use Include Files method or Frameset Method to design?
If use frameset ,the design has 2 frames which are a top frame and bottom frame and the critical(other programmer could add and delete links in the future) links are all in bottom frames. If use table ,only have to include files on the 1st row & 2nd row.Which is better to maintain ?
View Replies
View Related
I need to know if it is at all possible to have one main asp page that has various content plus an include file:
<!--#include file="banners.html"-->
the content on the main asp page needs to not ever refresh or reload but the included file needs to refresh/rotate every couple of minutes. Can this be done?
When I try to add "meta http-equiv="refresh" content="60" to the html file it reloads the entire main asp page. I must "include" the entire html or asp page because I am using 3rd party java script banners ... so random banner image rotation tips will not work.
View Replies
View Related
I want to include some asp if statements inside a do until loop, predicated on the recordset going until EOF. I do not have any < % %> delimiters inside the include file. The below doesnt show the character I want to display:
<% do until rs.eof
response.write rs("position")
<!-- #include file="inc_.asp" -->
loop %>
while hard coding the character with another response.write statement will.
View Replies
View Related
How to include audio files in ASP?
View Replies
View Related
I want to include javascript files based on the user location which I store
in a session variable upon user login.
The original code was like this
<SCRIPT language=JavaScript src="test_files/calcholidays.js"></SCRIPT>
We have multipe Javascript Script files and want to use the correct one
based on the Location Variable.
The variable is sLocation = Session("Location")
We would like the include file to look something like this
<SCRIPT language=JavaScript src="test_files/" & <%= sLocation %> &
".js"></SCRIPT>
Not sure how to write this.
View Replies
View Related
Can I include the same include files in global.asa that I use in other asp scripts? I haven't been able to make it work. My O'Reilly book says that global.asa can have includes, but the syntax required doesn't seem to be the same as individual .asp scripts.
I want to be able to use the same cleanup code in Session_OnStart and Session_OnEnd that I use from an on-demand script as well (for testing and inspection purposes). Can I do that? If so, can someone provide a fairly detailed skeleton or point me to a page that has this info?
View Replies
View Related
Just upgraded to Vista Ultimate, and running IIS7 for offline web development. Suddenly getting the message
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/daters/cards/previewCard.asp, line 98
The Include file '../viral_update.inc' cannot contain '..' to indicate the parent directory.
This worked fine in Win XP Pro/IIS6. What goes on? Do I have to use the full path or must the include file be located in the same directory.
View Replies
View Related
I am still writting VBScript code and .asp pages for our Intranet. Recently I learned how to use include files from this site.
I was very successful using include statements as long as I put the include statement inside the subdirectory that contained the asp files I was using.
I would like to put the include files in the root or a seperate directory and be able to call them from a page tghat is in a different directory?
View Replies
View Related
I had an asp page with lots of functions and procedures plus the actual transitional code for the page itself. This worked perfectly but now that I've finished the page and put all the functions and sub routines in an include file I have a problem. Code:
View Replies
View Related
I want to show 2 include files within the same webpage. Both include files are similar except one calls a different xml file. Code:
View Replies
View Related
Basically use Plesk to manage websites on a server and in the process of migrating domains. However Plesk creates virtual domains and all my websites use the following syntax to reference asp include files:
<!--#INCLUDE VIRTUAL="/misc/includes.asp"-->
This doesn't work now as the websites were setup with websites and NOT virtual domains.
So how do I successfully reference these files now?
View Replies
View Related
I have some asp files that are included in each of the (asp) pages of a new website I have built.I have many pages in the website, in many directories (3 levels).
The administrator does not alow to use parent path, and this is problematic to me now.
Any change of location of the included files, will not prevent from using parent path to access them.What can I do?I can not use one directory for all paes.
View Replies
View Related
I was just wondering if it's possible to do this type of action, the way i currently have it layed out, the system does not recognise the id variable?
IF NOT Recordset.EOF THEN
'Record Found
id=Recordset.Fields("Survey_Id")
%>
<!--#include file="quiz.asp?id=<%=id%>" -->
<%
ELSE
Response.Write("No survey found.")
END IF
View Replies
View Related
Is there a way i can send variables to an included page other than the session. I know about doing it via the session but i find that a bit messy and it might affect system performance.
can i use
server.execute (my.asp?id=6)
or something similar ?
I have to include a menu on the side of every page that looks different depending on what page is being displayed so i need to find a way to do this properly.
View Replies
View Related
I'm trying to build a part of an application that will use an include file based on a user's selection (still in ASP 3.0!). Their selection is stored in a database. I've tried using variables as either the entire include file or in parts of the include file, but nothing I've tried works - I.e.:
myTemplate=objRS("template")
<!-- #include file="inc_<% response.write myTemplate %>.asp" -->
Is there any way to accomplish this?
View Replies
View Related
how to automatically "include" all .asp files from a folder? Say I have an ASP page and there's a folder with 3 documents in it: /myfolder/file1.asp, /myfolder/file2.asp, /myfolder/file3.asp.
In my ASP page I want to automatically create server-side includes for all files in that folder so that if I ever add /myfolder/file4.asp, it'll automatically be included in whatever ASP page I have calling this function.
View Replies
View Related
I'm trying to get my head round includes:
A page that works fine when called by name from the includes folder loses its images etc when called as an include in a page closer to the web root.
Thus:includes/page1.asp contains the following
img scr="../images/pic.gif"
This displays the picture when the page is viewed on its own. The picture url is http://localhost/school/images/pic.gif
But when includes/page1.asp is used as an include in page2.asp (in the web root) the image is not found because the url is http://localhost/images/pic.gif
Is it something to do with virtual versus absolute file paths?
View Replies
View Related
i have recently completed and tested a site in using IIS on my desktop as a server,
and everything runs fine. Upon transferring all the files up to the Real Server at work,
the ASP pages are not displayed as i get an error saying that the include files caanot be found.
The include files for my ASP pages are in a folder called 'includes' which sits in the same dir as the ASP files. This setup works fine on IIS on my desktop, but for some reason, this same setup is not working when the files are on the Server. Has anyone got any ideas as to why this might be happening?
View Replies
View Related
I have two environments: DEV and PROD. In DEV I have two independent webs. In PROD one of the webs is the root and the other is a subweb of the root.
Each enviornment has a different file system configuration so I must manually change the file location references in my code when I post from DEV to PROD. Code:
View Replies
View Related
I have 2 include files on my page which are both navigation bars. When i view my pages in IE they look fine and everything is in the correct place, however the problem is that when i look at the pages in design view in Dreamweaver i can only see my first include file. the rest of the page is not displayed so makes designing hard as i cant really see what i am doing until i view my page in IE.
WHY IS IT DOING THIS???????????????? Or is this meant to happen, i have never used include files before, but im assuming this shouldnt happen?
View Replies
View Related