how to include a .inc file in asppages

Reply

Join Date: Oct 2008
Posts: 1
Reputation: vamsi.kiran is an unknown quantity at this point 
Solved Threads: 0
vamsi.kiran vamsi.kiran is offline Offline
Newbie Poster

how to include a .inc file in asppages

 
0
  #1
Oct 17th, 2008
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

  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
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 89
Reputation: msaqib is an unknown quantity at this point 
Solved Threads: 1
msaqib msaqib is offline Offline
Junior Poster in Training

Re: how to include a .inc file in asppages

 
0
  #2
Oct 18th, 2008
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 "\".
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC