Load ASP Code From Another File

I am writing a small CMS type system for our intranet at work and I am trying to have a main "index.asp" that does all the work in a template folder and every time I add a new section instead of making a new copy of this file I would like to have some generic "index.asp" file that is nearly empty that just calls the "template/index.asp" file and let's it do the work.

The way each page in the intranet works is by using the same asp file but by having a few configuration files in their directory that point it to different menus, titles etc.

Is there a way to load an asp file from another one? I tried creating an index.asp containing just <!-- #INCLUDE FILE="templates/index.asp"--> but it doesn't seem to do it.

View Replies


ADVERTISEMENT

Load Different Code Depending On Number Of URL Variables

Currently, when I'm building dynamic pages I build a page (for example, default.asp?ID=2) to process one variable within the dynamic URL (ID), and find myself having to create a seperate page if I want to process 2 variables for the same content (i.e default.asp?ID=2&Dt=3).

Surely there's a way of loading different content on the page depending if the URL you to the page has either one or more URL variables - is there a way of doing this? I've been thinking about it, and would it be simplest just writing an IF statement (e.g : if the URL contains only one URL variable, load this content, if it contains 2 URL variables, load this other content.

Would someone please be able to give me an example of how this IF statement would be written?, as I've never had the need to write an IF statement before. If you are able to give me an example of the IF statement I'm after, would you be kind enough to comment it aswell so I can understand the methodology behind it?

View Replies View Related

Down Load File

i have one text file when user click on link of this txt file ..than this file be downloaded to client machin...

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<a href="download.asp">dd.txt</a>

</body>
</html>

View Replies View Related

Load ASP File

I have downloaded an ASP WYSIWYG editor but I cant fingure out how to load an asp file into the editor. I think what I need to do is to load the file into the variable and then the editor loads the variable and formats the code accordingly. But I just don't know how to load the asp file into the variable. Here's my code so far:

Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("Test/7610.asp"), 1)

Dim DataTransfer
DataTransfer = f.ReadAll

View Replies View Related

ASP File Don't Load Properly Off Computer

When I try to open an aspx file located on my computer it doesn't load properly (i.e not all objects are visible like text fields and such) and it gives me a syntax error stating that it expected a semi-colon (;) on one of the lines.

My page language is VB and so no semi-colon is required and when I load the file through my web server by typing
http://myIPaddress/myfile.apsx
the page loads correctly and functions normally.

Several hard drive formats ago I was able to open aspx files with internet explorer without going through my web server. I am pretty sure I have everything installed like IIS 5.1 and the .NET framework.

View Replies View Related

Load Text File From A Remote Server?

Is there a way to load a text file from a remote server into a string much like using the Inet Control in VB? I am familiar with reading in RSS feeds, but what should I do if the content is a straight text file?

View Replies View Related

Need To Load File Path From Web Server Into Text Form Box

I need to load the file path of a file on a web server into a form text box. I tried using a normal form box using type=file but that just seems to return the file path from the local machine.

Ideally I'd like it if someone can get this to work with a file on a web server without using asp. If not then I suppose I'd have to use the FileSystemObject method. I can see how you can get a list of files from a remote server using FileSystemObject.

The problem I need help with is selecting a file path from the list of files into a text form box. The path of which I am then going to write to a database field.

View Replies View Related

ASP File Changes - Drops ASP Code

I have written a classic ASP calendar that has been on my organization's website for a couple of years now, and it has worked fine.

I do all of my writing to files on my hard drive, then when the files are working properly, I upload the files to the server. Therefore, the files on my hard drive should be identical to the ones on the server. This has worked fine in the past - I have had two fully functional calendars, one on my hard drive, the other online. Until now, they both looked and worked identically.

Now, I'm trying to modify the main file, "calendar.asp". It no longer works, and the online copy still works flawlessly. When I looked at the local file (calendar.asp), all of the ASP code had been stripped from the file. Of course, the online copy is still intact and working.

The only editor I have used on these files is Notepad (actually, Notepad ++, an enhanced Notepad). I would understand if I had tried to edit the files with Frontpage (I'm using Frontpage to upload files to the server, but that's all I use it for), but these local files haven't been touched by Frontpage.

What Gives? How can a file selectively remove it's own code and disable itself??!!!

I try exporting the files from the server, and though the server files still have their ASP code, the browser can't find one of the include files, which is plainly in the same folder as the calendar.asp file. The file "adovbs.inc" is no longer reachable from my hard drive, even if I export ALL of the files in the "calendar" folder to my hard drive.

What can be hoseing up my local files, and how can I prevent it? Although I have downloaded ALL of the files from the online copy to my hard drive, why do the files behave differently than they do online? What kind of trickery is this?

View Replies View Related

File Upload Code

I have a page for uploading files. I got the codes courtesy from Shadow Wizard's shadowuploader file which is posted online. as the asp upload is something new and i am not familiar with, anyway i tested the page to upload some files but there was an error displayed Error Type:

Microsoft VBScript runtime (0x800A004C)
Path not found
/shop/ShadowUploader.asp, line 283

it refers to this highlighted code in red. what does this error suggest. can anyone explain.

View Replies View Related

Code To Use File In A Directory

I'm coding a page where you can download a lot of different files( 100-1000) but I don't want to code each file(linking and all) it would take weeks to do that. I tried with a database and asp code rding the databse but it not saving a lot of time since I got to complete the databse.

I wanna know if we can code with asp something to automaticly read each file and list them in html so I dont have to code 1000 x the samee thing.

View Replies View Related

Include A File Code

I want to put this code in all my asp programs. code'objrs.cursorlocation=adUseclient' in all my asp programs. i hve created around 30 asp programs but forgot to place this one.

So is there any way to write only this code(objrs.cursorlocation=adUseclient) in any program, and include this file in all this 30 programs using #include file.

In all 30 programs , i have written code
set objrs=server.CreateObject("adodb.recordset")
objrs.open strsql,objconn,3,3

View Replies View Related

Code Behind File Not Being Refreshed

we're running IIS 5 and trying to do a simple update to a code behind file (Login.aspx.vb) we copy the file over to the server, but we're not seeing the updates. the server is still reporting errors on line numbers in the file that no longer exist. we've even stopped / restarted the service, with no luck.

View Replies View Related

Simple ASP File Upload Code

Can anyone tell me where I can find some 'simple ASP File Upload code'? I've googled 'File Upload' but they all seem to be very involved with a lot of files. I'm still considered a novice when it comes to ASP.

View Replies View Related

Simpe Code For File Upload

I have search the web last day all day and i did not find how to make a simple upload in APS not classes and third parties and don't know what .dll's that must be copyed on the server just 3-4 lines of code just like in PHP:

<input type="file" name="img">
$dir = "img/";
copy($img,$dir.$img) or die ("Error");

............

View Replies View Related

Code To Convert File Sizes

i have the following code that converts a file size into a readable format (10MB for example) to show to the user Code:

View Replies View Related

Encrypt An Asp File Source Code

we have an Enterprise Application on ASP and MS SQL 2000. Would like to know if I can convert the asp app to an exe or encrypt / encode / hide the source code so that no one accessing the server can touch / modify / copy the same.

View Replies View Related

Picture File Upload Code

I am looking for some code somewhere that is capable of getting information from a file submitted with the Form File tag and then uploading it to a remote server. Does anyoen know of anything?

View Replies View Related

Optimizing A Multidimentional-array-to-file Code

I have a multidimensional array that is actually 1 dimension (but it comes from a recordset.getrows). My goal is to put every single line of the recordset in a textfile.

currently, here is my code:

for i = 0 to UBound(Res,2)
fileContent = fileContent & res(0,i))
Next
createTxtFile(path,fileContent)

The problem is, I have 5000 lines and it takes about 10 minutes. I was thinking of doing a Array.Join but I don't think that works with multidimentional array. Also thinking of converting my useless multidimentional array into a sing dimensional array but how?

View Replies View Related

Load A DLL

Is it possible to load a DLL in an ASP page? I know that we can create instances of COM/ActiveX objects using Server.CreateObject, but what about a normal DLL stored on the system. Is there a way to load such a DLL and call its functions?

View Replies View Related

ASP Pages Will Not Load

I cannot display asp pages on my local pc but can display php pages and asp.net pages.

I get the following errors

1 -2147467259 (0x80004005) - when I have IE not show friendly error messages
2. Server Not Found - when I have IE show friendly error messages
3 Resources in use - sometimes - when I have IE not show friendly error messages
4. Sometimes I get the microsoft error report popup stating there was a problem with COM Surrogate

I am running Win XP Pro SP2 with IIS 5.1, and latest .NET framework (release not beta)

I have tried the following to solve this problem:

1. Set intranet security to as low as possible in internet options.
2 Set internet options to allow active content to run
3. Set security to low in IIS for the web site
4. Use http://localhost/webaddress.asp not C:filename.asp to open the asp page
5. Turned off script blocking in Norton Anti Virus
6. Have tried a simple "Hello World" page to ensure that there was no problem with the code itself
7. Checked that the asp.dll is where it should be
8. Have IIS set to allow anonomous logon
9. Have IIS control password
10. Have IIS allow windows integrated logon

I cannot think of anything else that would prevent the asp pages from displaying. I have searched the web and seen similar questions to this but no answers that seem to help resolve the issue.

View Replies View Related

Page Won't Load

I'm using IIS on my localhost and also in some free Brinkster webspace.
The problem I have is that when ever I try to use a script that includes the File System Object (as I want to read/write/copy files etc), the page won't load, the progress bar in the browser just very slowly increases, but never gets anywhere, and nothing ever loads.So I'm thinking it's a set up problem? I've tried the same scripts in my Brinkster webspace, and they don't work there (but I know they do work!) but Brinkster may have some restrictions.
Is an FSO problem like this common? Can I alter some settings on my localhost set up to solve it?

View Replies View Related

Load Database

I never used global.asa. I am thinking of load some data in
application_onstart which is read only from database(I mean the data will
never be changed in any asp pages of the applcation) and so any session for
this application doesn't need to reload data from database again, reduce
database connection and procedure call.
Am I right? just doesn't see that kind of comments on-line.
I want to make sure this is the right concept before I am heading too far.

View Replies View Related

ASP Pages Don't Load

ASP Pages don't load in IIS 5.1 for XP, continuously wait.
I have this very same website running same version of SQL server but on two different OS's. The website with the very same configuration, but running on Win2k with IIS 5.0 is working perfect. But the system running with IIS 5.1 on XP continuously loads and never displays ASP pages. After a few moments, if i refresh, it says that there is too much traffic to display the page. I am not worried about the second error, because I can simply fix that by disabling 'HTTP keep alive'. I searched for people that had similar problems, and what I found is that the problem seems to have originated from a Critical Update and users are either switching to Win2K or went with Apache rather than IIS.

View Replies View Related

Load A Drop-down Box

I am creating a asp page containing a employee time-sheet table in it. there are two columns in the table, one is time-in one is time-out, and the table total have 20 lines.
In both time-in and time-out columns I want they show up as drop-down box say as: 9:00 am, 9:15 am, 9:30 am etc, , but I don't want the page load each drop-down box in total 20 lines, I only want the drop-down box loaded when the employee click the field.
I know maybe I shoud use JavaScript onClick funtion, but I am not sure about it, and I don't know the detail coding.

View Replies View Related

Load An Image

i have an asp script to load an image. baiscally if there is an image reference in the database i want it to load that image but if there is not ref in the database i want it to load a default image.the code i wrote is

<% if Image = ""
then
%>
<img src="catalogueimages/default.gif">
<% else %>
<img src=<%=Image%>>
<% end if %>

have also tried null instead of "" but that didnt work either.

View Replies View Related

Can't Load ASP Site

I have IIS installed on Windows2000. When I create a .asp webPage with DreamWeaver, the browser (IE6) can't open it. No error messages, it just hangs there.

View Replies View Related

Load Msvcm80.dll

I have a webservice and iis webserver. if i open de asmx file i get errors saying Unable to load DLL 'msvcm80d.dll'

i added the modules to path directories and the directorie containing my webservice.dll file. still get the same error.

View Replies View Related

Load Balancing

I was wondering if it is possible, without software, to limit access to a page or section using ASP based on server load? I know you can install software and then call it using ASP, but I would really like to avoid this. I'm not sure if .NET even has this capability without using software.

I have a future project that they want to limit access to the management section if the server is under great load or is loaded more than 70% for example. Every search seems to bring me to .NET but I haven't had time to read in depth to see if it's built into .NET or they are accessing it through software.

View Replies View Related

Load Page

I wanted to know if there is a way to load a asp page in to it self.

View Replies View Related

Load An Asp Page Within Another

I have an asp page that gets data from a form in another page, for this, i am using the GET method to send the data to my asp page, and the page works great.

This asp page, nowadays, is quite big for displaying at once, so i decided to split this page in four new pages. Basically, my old asp page is now the static visible part, and the other four new asp pages, are the ones that will show the dinamic data.

What I tried was to make an <!--#include file... -->, and this works great for me if i have not to pass any values to the pages in the includes, but i have to, so what i want to know is if it possible to do this in any way, or, if i have to make four new diferent pages.

View Replies View Related

Heavy Load Stats

Does anyone know any stats on php vs asp with heavy traffic?

Let's say Asp is hosted on IIS6 & win 2003 with the same server specs as php on Apache & Linux. Both of them are heavy queried sites using MySQL. I saw a lot of people are saying php is the winner here, what do you think on that?

View Replies View Related

Focus On Load For Input Box

How do I make a form's text box focused on page load? I have a page that loads one text box for a user to enter their zipcode and then press search. How do I get the cursor to be in the box when the page loads. I do not have access to the Code:

<body
.

Only what's between the body tags. Maybe a javascript out there?

View Replies View Related

Images Won't Load In Navigator

i made a page that loads images from the server via asp scropts and it work fine on IE, but a client using netsape called and said that the images doesn't load and it just shows a broken link... i looked at the page through navigator and notice that the images/products/ was changed to images/products. What could be the reason for this?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved