Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call ASP file in Data Access Pages

Status
Not open for further replies.

samusa

Programmer
Jan 1, 2001
107
US
Hi Experts!
This is driving me crazy. I have created data access pages in MS Access and a logon page in asp.Data Access pages contains XML, VBS and Java Script.Login page is working fine and once user is enter user name and password it directs it to main page of the application.However there is a file titled securitycheck.asp that needs to included in all DAP's. Here is the code of this file:
<%

If session("loginID") = "" then
Response.redirect "default.asp?strMsg=You have been logged out for security reasons"
end if
%>

If i wont include this file , users can directly enter the DAP url and thus skip login page. Could someone tell me how to add this file in a DAP code or what is equivalent of this code in VBS. Will appreciate your help.

Sam
 
add it as a include file...something like this...

<!-- #include file ="securitycheck.asp" -->

-DNG

 
I already tried it but not working. I have placed it on top of the Data access page . can i put it in after <HTML> or after <BODY> tags

Sam
 
Thank you for your reply. It is not working. May be I am missing something. Is there a way I can hide sub pages from URL in address bar like if default page URL is and if a user clicks on another page say empinfo.htm , address bar should show instead of
Sam
 
Do your data access pages end in .htm or .asp? If tey still have htm extensions then you need to switch them to .asp extensions in order for them to have asp codeprocessed in them.

Regarding hiding the filename, no this isn't possible. It is possible to fake this if you only want to hide a single file. basically you have to name it Default.asp and make sure that every time you link back to it, submit a form to it, etc

-T

barcode_1.gif
 
yes Data access pages end up with .htm. Can you tell me how to convert htm to asp. Also is it going to make any difference.

Sam
 
First, rename the files from whatever.htm to whatever.asp. Secondly you need to change the links in the pages to reflect the now renamed files. Just use notetab or some text searching utility to find '.htm' and replace with '.asp'.

It *should* be that simple.

-a6m1n0

Curiosity only kills cats.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top