问题描述
我的意思是,像php'h包括...
I mean, like php'h include...
像
my_file_to_be_included = "include_me.asp"
-- >
什么我迄今所看到的,有一对夫妇的替代品,但其中每个人都有一些缺点...
for what I've seen so far, there are a couple of alternatives, but every one of them has some sort of shortcoming...
什么,我想弄清楚是如何使一个灵活的模板系统......而无需静态包含在一个单一的文件与loooooong case语句整个事情...
what I'm trying to figure out is how to make a flexible template system... without having to statically include the whole thing in a single file with a loooooong case statement...
在这里有几个链接
的
同样的事情
但它有一些不足之处,我想避免...好像(还没有尝试过)使用Server.Execute code在另一个上下文中运行,所以你不能用它来加载的功能计划在主叫code使用...讨厌...
but it has some shortcomings I'd like to avoid... seems like (haven't tried yet) Server.Execute code runs in another context, so you can't use it to load a functions your are planning to use in the caller code... nasty...
我不知道这件事(不能测试它尚未),但它似乎像这样的dinamycally处理页面给SSDI组件...
I'm not sure about it (couldn't test it yet) but it seems like this one dinamycally handles the page to a SSDI component...
任何想法???
推荐答案
没有你不能做一个dyanmic包括期限。
No you can't do a dyanmic include, period.
在这你最好的拍摄是一个使用Server.Execute和传球任何状态它通过一个会话变量需要: -
Your best shot at this is a server.execute and passing whatever state it needs via a Session variable:-
Session("callParams") = BuildMyParams() 'Creates some sort of string
Server.Execute(my_file_to_be_included)
Session.Contents.Remove("callParams")
这篇关于是它可以发出动态包含在ASP经典?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!