943,569 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 2026
  • ASP RSS
Oct 17th, 2008
0

how to include a .inc file in asppages

Expand Post »
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

asp Syntax (Toggle Plain Text)
  1. "for asp page "
  2. --------------------------------------------
  3. <!-- #include file="bottomnav.inc"-->
  4.  
  5. "BottomNav.Inc"
  6. ---------------------------------
  7.  
  8. <!--footer-->
  9. <%
  10. Dim objFSO
  11. Dim objFSO1
  12. Dim WSHShell
  13. Dim MyArray
  14. Dim subArr
  15. Dim Mesg
  16. Dim strFileName
  17. Dim FileNameInThisDir
  18. Dim ScriptFullName
  19. Dim strRootFolder
  20. strRootFolder = "\atpar\web" & "\.asp"
  21. Dim Msg
  22. Dim Dir
  23. objFSO = CreateObject("Scripting.FileSystemObject")
  24. objFSO1 = CreateObject("Scripting.FileSystemObject")
  25. strFileName = "AtPar_BusinessRules.dll"
  26. FileNameInThisDir = server.MapPath("/atpar/bin/") & "\AtPar_BusinessRules.dll"
  27. Dir=server.MapPath("\atpar\web" ) & "\*.asp"
  28. 'Dir=server.MapPath("\atpar\web" )
  29. Msg=objFSO.GetExtensionName (Dir)
  30. Mesg = objFSO1.GetFileVersion(FileNameInThisDir)
  31. MyArray = Split(Mesg, ".", -1, 1)
  32. Mesg = MyArray(0) & "." & MyArray(1) & "." & MyArray(2) & ".B4-SP1." & MyArray(3)
  33. objFSO1 = nothing
  34. MyArray = nothing
  35. %>
  36. &nbsp;</TD><TD width=3% nowrap>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  37. </TR></TBODY></TABLE></TD></TR>
  38. <TR>
  39. <TD align=left background=images/bottombg.jpg height=48 nowrap>
  40. <table cellSpacing=0 cellPadding=0 border=0 width=100%>
  41. <tr>
  42. <td width=217 nowrap><IMG src="images/bottom.jpg" width=217></td>
  43. <td valign=bottom align=center nowrap><SPAN class="PageFooter"><b>Copyright © 2001 - 2008 AtPar, Inc.</b><b></span></td>
  44. <td valign=bottom align=right nowrap><SPAN class="PageFooter"><b><%= Mesg %></b></span></td>
  45. </tr>
  46. </table>
  47. </TD>
  48. </TR>
  49. </TBODY>
  50. </TABLE>
Last edited by cscgal; Oct 17th, 2008 at 11:43 am. Reason: Added code tags
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vamsi.kiran is offline Offline
1 posts
since Oct 2008
Oct 18th, 2008
0

Re: how to include a .inc file in asppages

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 "\".
Reputation Points: 9
Solved Threads: 1
Junior Poster in Training
msaqib is offline Offline
91 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Redirecting from .html page to .asp page
Next Thread in ASP Forum Timeline: ASP and Connectivity





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC