i need to convert some existing templates into ASP, and have come across a stumbling block (which is probably only due to my complete lack of knowledge of all things ASP related ):
is it possible to include files held on a completely separate domain ? the standards include statement only seems to have file and virtual capabilities, and nothing comparable to php's capability of doing something like Code:
In ASP, is there a way to use a page to mask the identity of another page? So that say I had a page named google.asp, and I wanted to include all of what is actually on google.com, is there a function similar to the the include option that allows you to mimic a page, rather than include a file?
I am trying to include several files in an ASP script. I have a common file that does the database handling, and that common file will include common functions and classes used throught the script. Although I've checked each of the files for errors, none seem to have any, but when I call a class included from another file, I get this:
Error Type: Microsoft VBScript runtime (0x800A01FA) Class not defined: 'ASPTemplate' /test/test.asp, line 7
I'm trying to include and calling some ASP files from different directory. It doesn't work.
I need to use <A HREF>tag to link the ASP file and image file using <img src>tag. I entered the whole http://mydomain.com/....... path inside of tag. It doesn't work.
For example.
The original web page is reside in c:webrootwebpageestpagehomepage.asp
All the image files and other ASP files are reside in:
We have two sites hosted on different servers and we have many pages on domain A which has many links(asp programs) to domain B.
My question is if domain B server is in trouble, what is the best way to have all domain pages redirect to domain A? Right now I just have redirect code in each program on domain B to redirect to a maintenance page on domain A.
a source code regarding a search code like what the big G and Y did on their search box? say searching two keyword separating with a comma? using this doesn't help much
Quote: "SELECTfield_1, field_2 FROM table where field_1='" & keyword & "'" & " order by field_2"
I have a single asp page (index.asp) with an include file (include.asp). I would like to query the database with index.asp as well as query it with include.asp.
I searched online, in my "SAMS Teach yourself active server pages 3.0 in 21 days" and it makes no mention of two queries on a single page. Is this even possible?
I am developping a web-based file browser. Everything so far so good right now.
To make the userinterface more conveniant, I want to split my file list in pages. with
Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(CurrentPATH) Set oFolderContents = oFolder.Files For Each oFileItem in oFolder.Files (...) Next
I get a list of all my files in oFolderContents. Is there a easy way to
-split the whole list up in pages of i.e. 20 files -show general info (i.e. xxx files in folder, listing 20 files on page y/z) -let the user have the possibility to call the page with index i, where i stands for the i-th file on the list
I was wondering is there is a way to neaten up or rather seperate the main layout and the asp codes? For example, to have a main.asp(which is solely the design and layout) and include other .asp files that retrives and records the records.
i have a search form that will only search the whole string when searching a query. i would like to have the search string split into separate words so that each word could be used as part of a single query. is there a simple solution to my question ?
How can I correct an address if the user forgets a space between the number and street name? For example, "1600Main Street" would be corrected to "1600 Main Street".
Is there a way to go step by step from the left and enter a space if I hit a letter or stop if I hit a space?
I have a table with a number of 'advertisements', and each ad specifies a page display location (#1 - #9). I would like to query for all ads, but display them only where they have their location (see image above). I currently have 9 different SQL queries, one for each location:
"SELECT * FROM tb_ads WHERE f_adlocation = 1
I would like to have one query, and at location 1, simply say: "If f_adlocation = 1, then display here. If there is more than one, then repeat as necessary". Here is what my database looks like: I have attached sample data as a .txt file.
I have two sites on my computer. I am using a same page in the two sites. I set my IE to Korean (testing purpose) encoding for testing internationalization.
When I hit the same page in two separate sites, one shows the foreign characters in Korean, but the other shows garbage-looking characters.
if there's a better way to seperate my asp code from the main layout? like to have an index.asp(solely the layout and design) and just include other .asp files to display the records.
I am trying to include a file in an ASP page. But the problem is that the file is in a different folder. When i put the file in the same folder then it works fine. Is there any way to include a file from different folder. For Example I am using a file for database connection and including it in each ASP page as follows-- <!--#include file="Connection.asp"--> So i have to put this file in each folder of my web application. But i want to keep it only at one place. I have also done it with ../ and /(root) but both the methods are not working. These methods work properly on localhost but not on the hosted website
So far I have not been able to import a HTML-page in ASP like I can with PHP. In php you may import a page, and just get the output of the file (not the entire HTML-code, wtih tags like <body> <title and such). Is it possible to do this with ASP?
I would like to have header.asp to be usable from all directories. Header.asp will have images and URLs. When I try to #include the file in test.asp, it works fine. However, if I #include it in testpage.asp, the images in header do not work - testpage.asp thinks the images are in subDir, when they are in the images directory. I have tried a variety of combinations of MapPath, Server.Execute, but I have not gotten the image to appear correctly. What is the correct syntax for what I am trying to accomplish?
I'm after some coding that will allow me to include another url (website) on my page. What I basically want to do is keep my header and footer and use the information off their site so that when they update it mine will be too. I have their permission to do this.
What include statement would I use.
I know I can do it with frames but I would perfer to use a simple include statement.
I have included all the db scripts in asp above the <head> tag and <html> opener tag.When i submit a page, to add a record that record just get doubled and i dont know why that is happening.It dont happen always but now and then. The problem is not with cliking the submit button twice. So all i want to know is if it may be a problem with including the asp codes above the html tag or not?
How would I go about including a .txt file in an If-Then statement? Basically what I want is to have a certain file included depending on what the value of Request.QueryString("type") is equal to. Any ideas?
How would I go about displaying a plain text page that is located on a website that is not my own? For example... my site is www.x.com and www.y.com has a news article at http://www.y.com/article1.asp and i want to "include" this file on a page located on my site (www.x.com).
I wanna just include a .php in a .asp page,I mean,I use PHP Code:
<?php
include('etn.php');
?>
to include and execute the etn.php in test.php file, but now I need only to include etn.php in .asp file in a linux server. Is there any hint , or coding , or server side codes ?
I am having trouble trying to get a line of my script to work. I want to include the variable "name" in a hyperlink. The line of code I am working with is below:
Response.Write ("<a href=""band_news.asp?ID=" & rsCTD("ID") & """> Read more about & rsCTD("name") & </a>")
This code is throwing up errors every since I tried to add the variable for the output of the hyperlink.
I'm including a template on all pages in a site. In the template I have a menu. What I'd like is to have a different menu displayed if I'm in a different directory. Something along the lines of:
If path is /mainsite Then Regular Menu If path is /admin Then Admin Menu
Just not sure about how to go about getting there. My first thought was to use the PATH_INFO server variable, but that returns the page name too. Any suggestions?