this is ASP.NET版, not ASP 版>>>如何取出层层包含的完整内容,然后将所有实际的内容变成一个文件,此文件不再有任何包含文件?too bad, this process is handled by ASP, you don't have control, so I would suggest you write a script, parse all the files involved recursively to combine. It is not hard, you only need to look for <!-- -->, :)

解决方案 »

  1.   

    all right, here is a quick and dirty solution (be warned, you have to know what you are doing)
    1. run Internet Services Manager, right click your Default Web Site to open its Properties page
    2. go to Home Directory tab, click on "Configuration" button
    3. double click on ".asp", copy the path in Executable textbox, which normally is
    C:\WINNT\System32\inetsrv\asp.dlland save it to someplace4. close the window5. double click on ".shtml", copy the path in Executable textbox, which normally is
    C:\WINNT\System32\inetsrv\ssinc.dll
    6. double click on ".asp", paste the content in step 5 to the Executable textbox7. reboot the web server, or open a dos window, run "iisreset"8. run your page, view the source, save it9. copy the path you saved in step 3 back to ".asp"10. good luck!
      

  2.   

    思归:
    你的思路不错!
    但有一个问题,就是在这种文件数量较少时用此方法很好,但如果有大量类似文件时就太麻烦了。
    我做这个的目的:
    我正在写一个新闻发布系统,模版化支持、用户可以选择直接生成几种文件方案(PHP,ASP,ASP.Net,Html等)。比如在新闻发布时,用户选择生成ASP文件,那新闻系统就根据模版生成ASP文件,其中可能就有包含文件等等。但如果用户生成选择Html静态文件,那么就不能有任何包含文件,而由Html标签组成,但这个文件是由模版库定义的,可能是基于asp.net的,也可能是基于asp的(正如上面的例子一样),也可能是基于PHP,JSP等,总之由模版库定义即可。
    这就产生一个问题:用户如何“所见即所得”,如何最后产生html文件呢?更麻烦的问题是:我写的这套系统是基于ASP.net的,如何执行PHP、JSP并产生出Html文件?许许多多的问题都要解决。由于IIS可以同时执行ASP及ASP.net,所以产生相关代码不太难,但生成PHP,JSP的方案就没那么容易了。但我相信,通过ASP.net的WebClient,XML等应该可以解决。
    其中一个思路是:
    首先生成最终的ASP/ASP.net/PHP/JSP文件,然后动态执行之,用WebClient或WebResponse或XMLHttp等方式得到执行结果,写入一个HTML文件。不知还有没有更好的办法呢?在此非常感谢思归的大力赐教!
      

  3.   

    I thought you wanted to get the ultimate server code file in ASP environment, if you just need the final html file, then your own method is the best
      

  4.   

    这个问题正在解决之中。谢谢思归!“预览”功能实现问题:http://expert.csdn.net/Expert/topic/2528/2528527.xml?temp=.2653162
    不知如何取得当前值:e.Item的Value值。
    在ItemTemplate及EditItemTemplate中分别有一个E_MemoItem和E_MemoEdit的TextBox表示新闻内容,我想在浏览及修改状态下都可以看到“预览”按钮,点击按钮后查看预览结果。
      

  5.   

    this is ASP.NET版, not ASP 版
      

  6.   

    xiaomaolover(啤酒泡泡) :
    没错,但我也是在ASP.net下实现ASP/JSP/PHP/HTML及ASP.net文件的相关功能转换。