Include Files In Global.asa?
Possible? It seems nobody knows how...
View RepliesPossible? It seems nobody knows how...
View RepliesCan 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?
I have added a db driven marquee to my site and need to combine the global asa's to 1 global asa file. Code: ......
View Replies View RelatedI 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.
View Replies View RelatedI have written general purpose functions in one of the include file, I want
to use the same in the global.asa. Do you know how to use include file in
global.asa
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
Code:
<!--#include file="http://81.74.60.30/Asp/SicurezzaDip.asp"-->
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?
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.
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.