Preventing Multiple Includes

Is there a way in ASP to prevent including the same file more than once?

Example:

dbutil.asp needs constants.asp, so I include constants.asp inside dbutil.asp.

transact.asp also needs constants.asp, so I include constants.asp inside transact.asp.

transact.asp doesn't need stuff in dbutil.asp, and dbutil.asp doesn't need stuff in transact.asp.

Then later I might have a main.asp that needs both dbutil.asp and transact.asp. So I include them both. However, the constants.asp will be found to be included twice!

What can I do to creatively prevent multiple inclusion of the same file in ASP? I know how to do it in C and C++, but I can't apply that to ASP, it seems.

View Replies


ADVERTISEMENT

Preventing Multiple Login Prompts When Using 2 Different Domains

We have 2 domains for internal purposes: one for users (have to login
and domain has SSL) and another for sponsors (have to login and domain
does NOT have SSL).

Now when a user logs in and there are pages that have info from the
sponsors domain, users are asked to login again with a warning message
saying if they want to see secure and nonsecure information. How can
I bypass the second login? Is there something I can do in active
directory, IIS, or ASP to not have the second login appear?

View Replies View Related

Preventing Sql Injection

I just wanted to share it with you guys and ask your opinions. Code:

View Replies View Related

Preventing Errors

I'm using if for when the user deletes a record from the database. People using the website try and delete more than one record at a t time by placing commas between the IDnumber ie. 1,2,5,9 etc.

This creates an error. So instead of this error appearing, how can I get a small alert box telling hte user he/or she has entered the wrong data type?

The code for the form is :-

View Replies View Related

Preventing SPAM

Is there a script that change email adrdresses to prevent SPAM.

ex: ticul@myprovider.com

I want it to appear like this on my webpage ticul@xxxxxxx.com or something that look like this

View Replies View Related

Preventing Session Variables

In ASP classic pages,I want to know if it's possible to prevent
session variables from becoming zero length strings? I have tried
setting the Session.Timeout to a large value, but alwas, after 20
minutes, my session variable times out. I also tried setting the
session timeout in IIS manager to a high value, but this did no good
either.I just want to allow one particular session variable to last a long
time.

View Replies View Related

Preventing / Removing Duplicates

I have a permission tracking app that I am working on, and I have made the insert page for it. I am having issues on how to prevent duplicates from getting entered.

Currently the interface for the app has a mixture of select boxes, list boxes and checkboxes. The form submits the page to processAIMR.asp and then does the inserting. I am using a loop to insert a new record for each checkbox checked or listbox entry selected. Code:

View Replies View Related

Preventing Form Caching

Does anyone know how to prevent the browser from automatically adding the password to a form after a user name is entered? I need to be able to over ride the brower setting so turning off the option in IE is not really a solution.

View Replies View Related

Preventing Refresh Page

I have a form that sends info to a preview page, then to a thank you page. The thank you page gets the data passed from the rpeview page and sends an email.

How can I prevent the user from refreshing the page, so it doesn't send the email again.

View Replies View Related

Preventing Concurrent Logins

I would like to prevent a user from logging in with their user/password combination on a different computer or even a different browser window, if they are already logged in. I have a login page, from which I use a DB check to verify user/password info. Also, I have a bit loggedIN field in the DB, which I use to see if they are currently logged in; if so, I prevent them from logging in a second time.

Unless they click the "Log Out" button, then the DB value does not get changed. Any suggestions as to how I can log them out, even if they simply close the browser window or jump to a different page?

View Replies View Related

Preventing Error In One's Application

For instance here's a simple select statement Code:

("SELECT a, b,c d, e, f FROM Table WHERE a = "&CInt(j)&" and c= 0")

j is a dimmed variable which is a and it's numeric. Is the above protected against any non numeric instances? Like j=2,345..i've tested this and it works i'm just trying to see if i've covered all my tracks.

View Replies View Related

Preventing A 2nd Form Submission

How do people go about preventing the user from submitting a form for a 2nd time? For example, the user submits a form, clicks on the back button, and the submits the form again. I have used various techniques in the past (depending on circumstances) but I'd be interested in the techniques you guys currently use.

View Replies View Related

Preventing Double Bookings

I have created an Intranet in my office using ASP (of course). Within it is a booking system, allowing booking of conference rooms, digital camera and other equipment. It works perfectly...almost, as there is no way to prevent double bookings.

I really don't know where to begin with this one. All bookings go to an Access DB, into a single table. The bookings have a start time and an end time (24hr).

I would like it so that when the user submits the form, if there is a clash in times instead of saying, thanks for your booking, to redirect them back to the booking page saying there is already a booking for this time and that I am very sorry!

I guess I have to check some value in access and return the info back to the webpage before it chooses where to redirect the user.

View Replies View Related

Preventing Session ID Replay Attack

I am developing a Simple ASP Website with a login page. I want to
know how can I change Session ID after login and also Close the current
Session after User closes the Window or gets logged out of the Website. So
that every time user logs in into the website, Session ID will be unique.

View Replies View Related

SQL Injection And Preventing Querystring Abuse

My client received an email from a user who mentioned that by accident they had been typing (over the querystring I guess), and the url had become:

default.asp?pageid='asd

They then received a SQL Server error message.

My client contacted their webhost, who came back to them promptly and talked of 'SQL Injection', they said that we would need to secure the code as well as the permissions on the database(which I believe they have done)..

This is something I had over looked, and started to write a fix for a couple of nights ago...but I dont think its 100%....

Basically I now do this at the top of my default.asp page ...

View Replies View Related

Preventing Form Injection On Classic ASP Pages

I've seen plenty of articles and utilities for preventing form injections for ASP.NET, but not too much for classic ASP. Are there any good input validation scripts that you use to avoid form injection attacks? I'm looking for good routines I can reuse on all of my form processing pages.

View Replies View Related

Preventing Windows From Suggesting Usernames In Login Boxes??

How can I prevent this from happening? For example when the asp
application works in a public terminal where we don't want successive
users to know the login password and user name of the previous ones?

View Replies View Related

ASP Includes?

As im used to using php im not to famillier with asp Is there such thing as a asp include? and how would i do it?

View Replies View Related

Includes

I have a folder structure that looks something like this.

root
->inc
->files
->system
->->area
->->group
->->->Layer3

etc.

I want to add a include file from the original folder level from the "inc" folder.
The file of where the include will be used is located within the folder named Layer3 folder.

How do I add in the include referencing the file.
Do i just use".."

For every folder level i want to go up to gain access to the file?
Do i just continue to add ".."?

View Replies View Related

ASP Includes

My web designer created my site with a header include or something to that effect. My question is this: How do I change each page title to what I would like for SEO purposes? When I put the desired title onto each page, my includes/header.asp file "overwrites" the desired title; thus, every static page has the same title. Creating separate include files would work but would take forever. I have even tried leaving the title tag blank in the includes.asp file and add the desired title to each static page, but the title tag doesn't end up in the <head>, just the <body> tag.

View Replies View Related

Xml Includes

I have a XML file that I've formatted using xsl. now I'd like to include that xml just like a normal file in an asp page.

I have the following code but it's really buggy and sometimes it works and sometimes it doesn't, really confusing!!! Code:

View Replies View Related

Includes

When writing ASP pages that have include pages, is best to make the include pages as txt, asp, inc??? which format would be the most efficient.

View Replies View Related

Includes

I've a big include asp file with a lot of function and subs, some of them with a long html code embebed, in this intranet and I'm not sure if I should break it in a several include files in order to improve the performance.

My question is:

leave it as it is because all that code runs into memory only once , say at log in, or
break it in several others, in order to access the code that really is to be accessed.

View Replies View Related

Includes

I have a table that I am using as a main skeleton for all my pages to use. The problems is that I want other pages to be inserted into a specific cell.

I have a skeleton.asp with 2 rows and 2 columns. I will create pages like company.asp which will have just text in them and they will use the include tag and include the skeleton.asp.

The problem is that I want the text only page to be inserted into the lower right cell on the table in the skeleton.asp. I have seen it done many times but I cannot remember what the tag was that you put in the cell to put the include contents there.

View Replies View Related

Includes

I have a page that uses includes.It has 1 include to bring in a header, 1 for the menu, and then there is a content area.

This content area I need to change.So, for example, the link would be index.asp page=aPage.asp and it would load my page that page witht the header and menu and for the content area include aPage.asp.

What is the script I can do this with. I tried simply using Response.Write and then just righting the <! #include --> tag with the right page in there, but it just writes that without parsing it and including that page.

View Replies View Related

Includes And CSS

I have an include, which is used as the header of my site, that has a bit of CSS coding in it. The CSS code along with an unordered list creates an expandable menu. The include works great when you view it at its URL, but the menu doesn't expand when a person has to access dynamic pages.

I have found out that the problem is that when the file is included the code is not inside the <head> tags, so thus the menu doesn't perform, or expand. Is there any snippet of code that could automatically put the CSS inside the <head> tags?

View Replies View Related

Includes Like ISS

I have made my asp pages but the left side navigation menu I want to be an include so if I ever change a link it's easy to update them all by changing the nav.asp file. How can I include the nav.asp file on the other asp sites like adminpanel.asp .

View Replies View Related

Includes

Can someone comment on the use of SSIs? Do these place a lot of strain on the server?
Also, are "virtual" includes or "file" include directives more efficient?

View Replies View Related

Includes And ASP

I am writing a mail order site using includes and nested includes for ASP code. I have no idea if this is rendered without error in all browsers. Does anyone have any idea on this? Code:

View Replies View Related

2 Asp Includes, And One Depends On The Other

I have a main file (asp), from which I include 2 different asp files. The second included asp file references an array element deefined and populated in the first include asp file. However, the array value is not being resolved in the second include.

This is not on a Windows server, but rather a UNIX server. However, the host provider claims ASP and SSI support.

View Replies View Related

How Do Includes Affect?

if there are alot of include file in ASP pages, what happens? the so much include files,the diffucult page load ?

View Replies View Related

<iframe> And Asp Includes?

saddled with using an <IFRAME> area on a classic asp page from the designer, so I'm trying to find out the following.

on that page I usually use the <IFRAME> to hold a simple HTML page, that the client will have access to from my CMS program so they can make edits, updates etc.

but, one page has a search functionality, written in classic ASP and using MS-Access dbase to find members of the association etc.

when I put the asp search page inside the <IFRAME> src , it wont show? ie --
<iframe src="findlawyer.asp" frameborder="No" width="756" height="427" id="iFrame" vspace="10">

-- should mean that the page findlawyer.asp should show up inside the holding ASP page (called simply find.asp)

why? when I look at the findlawyer.asp page online it shows up perfectly and works perfectly too....yet inside the <IFRAME> it refuses to show up???

View Replies View Related

Dynamic Includes From URL

Is there any way to dynamically generate an include file based on a variable passed to the asp page via a url ?- so for example:

Person x clicks on a url - that ur directs them to template.asp (template.asp has no code in it other than page title etc and <!--#include file="<%variable%>" --> )

Once in template.asp the page loads the include file that is relevant to the companies website that the link was clicked from.

In that include file will be the correct form and stylesheet setting for that company.

What we are trying to do is achieve a global template file which multiple customers can direct peo[ple through and all the data is therefore stored in one central repository.

The file displayed when they reach template.asp will depend on the url they clicked. Basically how can i get the url to pass the variable which the include file will then load??

View Replies View Related







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