| | |
how to include a .inc file in asppages
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi all,
This is vamsi from Hyderabad. From the past 2 days I am very difficult to solve this eror. We are working for a product project in which it have to include a patch version in end. this patch version should get dynamically depends upon assembly version. So I created "BottomNav.Inc" file . It works fine with aspx pages. But not working with .asp pages.
can you suggest me how to add this. please find the code I have written for both asp and "BottomNav.Inc" below
This is vamsi from Hyderabad. From the past 2 days I am very difficult to solve this eror. We are working for a product project in which it have to include a patch version in end. this patch version should get dynamically depends upon assembly version. So I created "BottomNav.Inc" file . It works fine with aspx pages. But not working with .asp pages.
can you suggest me how to add this. please find the code I have written for both asp and "BottomNav.Inc" below
asp Syntax (Toggle Plain Text)
"for asp page " -------------------------------------------- <!-- #include file="bottomnav.inc"--> "BottomNav.Inc" --------------------------------- <!--footer--> <% Dim objFSO Dim objFSO1 Dim WSHShell Dim MyArray Dim subArr Dim Mesg Dim strFileName Dim FileNameInThisDir Dim ScriptFullName Dim strRootFolder strRootFolder = "\atpar\web" & "\.asp" Dim Msg Dim Dir objFSO = CreateObject("Scripting.FileSystemObject") objFSO1 = CreateObject("Scripting.FileSystemObject") strFileName = "AtPar_BusinessRules.dll" FileNameInThisDir = server.MapPath("/atpar/bin/") & "\AtPar_BusinessRules.dll" Dir=server.MapPath("\atpar\web" ) & "\*.asp" 'Dir=server.MapPath("\atpar\web" ) Msg=objFSO.GetExtensionName (Dir) Mesg = objFSO1.GetFileVersion(FileNameInThisDir) MyArray = Split(Mesg, ".", -1, 1) Mesg = MyArray(0) & "." & MyArray(1) & "." & MyArray(2) & ".B4-SP1." & MyArray(3) objFSO1 = nothing MyArray = nothing %> </TD><TD width=3% nowrap> </TD> </TR></TBODY></TABLE></TD></TR> <TR> <TD align=left background=images/bottombg.jpg height=48 nowrap> <table cellSpacing=0 cellPadding=0 border=0 width=100%> <tr> <td width=217 nowrap><IMG src="images/bottom.jpg" width=217></td> <td valign=bottom align=center nowrap><SPAN class="PageFooter"><b>Copyright © 2001 - 2008 AtPar, Inc.</b><b></span></td> <td valign=bottom align=right nowrap><SPAN class="PageFooter"><b><%= Mesg %></b></span></td> </tr> </table> </TD> </TR> </TBODY> </TABLE>
Last edited by cscgal; Oct 17th, 2008 at 11:43 am. Reason: Added code tags
•
•
Join Date: Sep 2004
Posts: 89
Reputation:
Solved Threads: 1
What I can understand that it might be a problem with File System object, that it can not read the fiels or ASP engine can not access the files in that directory. Check to see it IISUR has the permissions to access this directory.
Also Dir=server.MapPath("\atpar\web" ) & "\*.asp" here try to use "/" instead of "\".
Also Dir=server.MapPath("\atpar\web" ) & "\*.asp" here try to use "/" instead of "\".
![]() |
Other Threads in the ASP Forum
- Previous Thread: Redirecting from .html page to .asp page
- Next Thread: ASP and Connectivity
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection diagnostics dreamweaver excel fso iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit webserver windows7





