Is it possible to get the filename, and more importantly the path, from inside an ASP file, when that file is included? I know it can be done for the base file using Server variables, but I can't figure out how to do that for an included file.
I need to write an application that uses include files, and that may be moved to another folder on the server...
I want to save space and time by creating a simple .asp or .txt file that is called into a page. That is a simple include code but how do i make it so the same page opens but the included file changes dipending on the linking page.
something like a dinamic included code.
<!--#include virtual=" dynamic field that changes according to link"--> Do you think you can help me guys?
I have a standard Header.asp that I want to include in every other page in my site. Header.asp is located in the root folder, but the calling pages are in various folders/levels. Since the relative paths specified in header are subject to change and are based on the relative path of the calling page, problems arise. (Strangley, using the IFRAME method of including a header doesn't react the same way.)
The solution I believe lies in using absolute paths in the Header.asp file using the "virtual" include qualifier. But this assumes your development directory structure is the same as your production environment. So I guess that is the answer. Use absolute paths and set up your development directory structure to be identical to your production.
I'm wondering for a way to reload my included page (with a few recordsets) from time to time and display and alert for a trigger limit (based on recordset results)..
I tried to reload it using js, but in that case it reloads the whole page and not only the included file...
<script type="text/javascript"> function page_reload(){
window.location.reload() } function page_reload() { var t=setTimeout("page_reload(),30000) } </script>
For reasons unknown to me I frequently will get an error - to the effect that the function can't be found.
If I hit refresh/F5 it loads the page just fine.
It doesn't happen often .. maybe once every 50 pages. It also doesn't happen on any specific page.
I'd show code, but it's not really related to either the function or any specific page.
Is there any sort of a delay between Asp loading the "includes" and processing the rest of the page? I'm wondering if the function is getting called before the include is pulled in.
I have a pretty complicated site written in ASP (it's not live yet, so I really do not want to post a url). On one of my pages, I have a header, the top area, and then the middle area which changes when I click on different links, but the url remains the same.
I need to figure out how to print the middle area. When I just do a print page, it doesn't come out formatted correctly at all. I've been playing around with printing/converting to PDF, which works well, except that most pdf components expect a URL to print, and in this case my url is generic..it doesn't point to a specific page.
I've got a file in an application that is included in many, many files of an application, like this:
<!--#INCLUDE FILE="inc_file.asp" -->
I need an instruction I can included at the beginning of inc_file.asp so that it will not process if I decide to turn it off. I know I can just replace it with a blank file, but I'd like something more flexible.
I'm assuming that Response.End will end the entire script, and not just the included file.
got this code , among others (attached below) for shopping cart from a friend and it suppose to work, however it requires a connection string to make this database driven website works, so my question is how do I insert a connection string code in the string so that it will make a connection to the Access database. Code:
I'm attempting to include a file within another file using Server.Execute. This works fine... however, I need to pass the value of a variable defined within the parent file to the one included via Server.Execute.
From what I've read, the included files are processed before the parent files, so it seems as though the variable is getting lost. Is there any way to internally (not relying on query string) to pass a variable to an included file?
I been trying to send a Html email with a form included. I tryed by including <form> and <input> as usual in Html code. What happen is that the email is send and the form are seen but the input button doesnt work right, in hotmail , msn, I mean its not active Any idea?
I have a client application that uses web services. When the client application an web services are in the same machine, they work fine. But when the application call the same web services hosted in other server, the server return: Code:
I am using frames in html. How can i redirect to an asp file in a new browser window.So that the redirected page opens in new window instead in a frame.. Code:
Is there a way to set the location where the input type="file" option gets its files from. I know you cannot set a default file, but is there a way to set where it starts looking.
tell me anything they know about locating WAP users. I assume that there must be some information on their current cell sent in the WAP request headers, but i'm not sure. I want to make a WAP site that appears differently depending on the users cell location.
This is a dumb question but i am just starting out with ASP. I am working in vbscript and i am trying to do a OpenTextFile the problem is that i am editing my page on a different computer from where the server is. I know that if i were trying to open the file from the server i would type:
I am use to the include file on classic asp for maintaining MS Access database location. On using Visual Web Developer Express, I can only use the MS Access database if it is located on the same folder with the web app. Is there a way that I can locate MS Access as my database but the location is not located on the web application?
We have special kind of service that covers just north on America (US and Canada), so we want to redirect users comming from another country to another page.
I am looking for a web service or similar thing that tells me the country and state/province of incomming IP address. I am sure it is possible but i don't know who sells that service.
Could anyone refer me to any resources related to that ?
I'm using a segement of code in my global.asa to open a db connection check a users ip address against those i have in a recordset and then take the appriopriate action, very handy for banning bad bots who ignore my robots.txt and users who abuse my system.
I have been unable to find any code that will allow me to resolve an IP address then determine which country the IP is registered to.
I've seen it done all over the net, even resolving it down to the town I am located in.
I am hosting on GoDaddy, so I can't install any componants (I did find a couple that could do it). So I'm looking for a code only solution if that is possible.
If anyone knows of any Perl or PhP code that can do it, please post a link and I'll port it to ASP if possible and post it.
I have 3 includes in 1 asp doc-left,header,main. header contains my menu. I want to click the menu and change the main incude file, but I don't know how to. I though a window.location.replace line could work. what should i do?
i m developing General Ledger application in asp.my company is located head office at south and is branch office in west so i have to developed an application that data related to south they can post there data.so as well as west.now problem is that what techniquei should use.
In my opinion i can create administrator login form where person in south can log on with it and enter his data while same as person in west. or what should i use.
I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due to which a timeout occurs.If I change the cursorlocation to adUseNone(1) or adUseServer(2) then the search is faster and without any problems. But the sort on records cannot be done if I use adUseClient(3).
I need to have sort on these records. I am using dynamic server side cursor.Also my result set is not huge ..just 80 records.One more thing that is wierd is that the result set comes back instantly for the first search,but takes forever when searched again for the same criteria. Eveytime I logout and login and do the search for the 1st time the search is quick and takes forever for consequnt searches.
how to dirrect the IIS installation to an other drive or how to manually move all related files to an other drive? I think I can menage the sites, but NNTP and SMTP I can't see where.
I have a website on an IIS 6.0 server and I am trying to update the settings via asp page and vbscript. Below is the code that is supposed to retrieve the Metapath, and it does, however it is erroring out with 80070003, Can not find path when I am trying to get connected using the Set IIsWebVirtualDirObj command. Code: