可以退回/退出ASP.Net包括?

时间:2016-10-06 12:32:07

标签: asp.net vb.net server-side-includes

如果我的父文件包含include:

' Parent.aspx
<!--#include virtual="/inc/MyInclude.aspx"-->

MyInclude.aspx 中的是否可以从include中“返回”或“退出”?类似的东西:

' MyInclude.aspx
if someCondition then
    'exit include - in other words, don't process or render any more of it.

' Rest of include contents
...
...
...

我知道我可以做一个if / else之类的:

' MyInclude.aspx
if someCondition then
    'do nothing.
else
    ' Rest of include contents
    ...
    ...
    ...

但我只是想避免缩进包含的所有内容。

0 个答案:

没有答案