is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that reading the file using "Response.Write FSO.OpenTextFile(ppp, 1, False, False).readall" prints the file, and treating it like a html file.
however, this doesn't seem to work, as i get the following error message :
The include file '<%=fileToInclude%>' was not found.
it obviously is trying to find a file named <%=fileToInclude%> instead of seeing the variable my question is : is it possible to feed a variable into an include statement ? if yes, how should i go about it ? if not, are there any alternatives ?
how to assign a variable in a page then in a file that is included write a variable to an include virtual statement that's located in the 2nd included file? I've tried this but it doesn't work Code:
I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.
I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.
Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:
How can it be possible to include the script.php into page.asp (and make it work) without changing any extensions of files? SSI is supported, but i don't know how to use it.
I have different database connections that I use for DEV and PROD versions of our web app. I want to put the database connection string in one location so I only have to change it once when we push live.
So I put it in an include file and reference it in all my asp pages as:
<!--#include file="includes/db_conn.inc"-->
But this will not work with the global.asa page. How can I reference an include page from global.asa?
i have many *.html* pages with the same header. i wanted to make one *header* file and put a link to that file in all html pages. So if i ever need to make changes in the header, i will need to edit only 1 file rather than all pages.
for *.asp* pages this code works fine:-
<!-- #include file="filename.inc" -->
but the same **include** does not work for *.html* pages. i guess there is some other way to put a link!
I'm make a site that will contain an include statement that updates and gets data from the DB, but the text after the include doesn't display. When I don't have the include statement, the page displays perfectly.
Here's my statement: <!-- #include file ="getData.asp" -->
Please let me know why it's not letting me display anything after my include statement, and what I can do to fix that.
On the rest of the site, virtual includes work, but on one particular page, non-virtual includes work, but virtual ones do not... even though the include statements are copy and pasted from working pages, or are part of non-virtual includes that are included.*
I assume there is something in the page's code that is prohibiting virtual includes? Code:
to download my asp page to the client. The download process works great but when I open the .doc file it is missing the image included within the html <img> tag of the .asp page. How do I get the image to come down with the text?
Basically, we are working on a website where we want people to be able to see about 10minutes of our live streaming webcams on a once off basis. We are working on IP address sessions to do this, my question is however we want to have a single page with a countdown timer and the streaming video.
Now the timer is located on a local server but the streaming video is coming from a remote location, can we include use the remote asp page inside our local page. So far we keep getting the remote url displayed but not the media player.
This correctly ran the script, but it was unable to include the QUERY_STRING from the parent URL into the included perl script, and there seems no work around to enable me to do that on IIS 6.0, therefore on this thread:
I was recommended: "to a simple ASP page which will easily do exactly what you want because it actually has the functionality you want, by intention, and is supported." Code:
I'm building a site which runs on 4 templates, each a different colour. I would like to pull in different content into each template using ASP.NET, similar to the php version of index.php?page=content.
I've not programmed in ASP before so am hoping someone can either supply me with a script or point me in the right direction.
basically i want to send a web page off by email. so i was thinking of putting some asp scrip at the end of the page to do this...
<html>.....</html>
<% dim a a = page_content send_email(page_content) %>
but how do i get page content? Is there some variable I can read that has it stored? is there some way I can all the stuff that has gone out to browser?
My goal is to retrieve my local machine's %USERNAME% environment variable from ASP page.
When I enter http://RemoteServerName/testusername.asp?id=%USERNAME% directly into the IE Browser URL box, %USERNAME% is repalced with the local machine ID. However <a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get mahcine id</a> in an html file and use Request.Querystring("id") to retrieve it in testusername.asp page, it returns "%USERNAME%". I guess IE browser is smart enough to replace %USERNAME% with the local environment variable value before sending URL string to the web server when you type directly into the Browser URL box.My question is , is there any way to retrieve local machine's environment variable, %USERNAME% from ASP page?
Is there a way to save the contents of a web page to a variable? I have some Word docs that have been saved as HTML (yuck!), but I am stuck with them. I would like to create a page that writes out the contents of the word/html document while maintaining the formatting.
Is it possible to send a variable through a hyperlink, to a frames page, and have all 3 pages in the frame pick up the variable using the request.querystring ?
In other words, I click on a link that has ?id=2 lets say.. it goes to a page called umm say index.asp the index page has a top, main, and a left. how do i get each one of those to receive the variable, when i can only send it to one page? or is it possible to send it to more than one page, but only travel to one page? so the link looks like index.asp?id=<%=var%> Code:
I want to pass a variable or value from the pop up page to the parent page. how do i do that? Another approach i was thinking was dragging and dropping the selected variable from pop up page to the text box in the parent page. but i dont know whether ASP has any drag and drop module or something.