using Classic ASP INCLUDE VIRTUAL in ASP.NET page -


i maintain classic asp intranet site. i've developed new page in asp.net has link old site. use include intranet puts header menus on each page. compile error when run new page in debugger. include file contains nested include files. error says can't find nested includes. it's looking them in c:\xxxxxx when actual physical path on d:\ drive.

apparently it's resolving include virtual top level include, because it's looking nested includes.

why resolve first include, finding on d:\ drive, looking nested includes on c:\ drive?

here's code top level include

< !--#include virtual="/includes/page2header.asp"-->

here's code nested includes

< !-- #include virtual="/inc/menustyles.txt" -->

< !-- #include virtual="/inc/config.asp" -->

the site running on iis 7.5.

the site located on server on default website in virtual directory in path d:\inetpub\wwwroot

the compiler looking nested includes in path error, not find part of path 'c:\inetpub\wwwroot\inc\menustyles.txt'

include files don't work in same way in asp.net in classic asp. when use include directive, results in file content being rendered plain text in asp.net page. have take asp.net route solve problem. typically, user controls used render snippets of reusable html.

see article on topic more information: http://www.mikesdotnetting.com/article/144/classic-asp-include-files-in-asp.net


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -