ASP.NET JSP相当于包括 [英] ASP.NET equivalent of JSP include

查看:89
本文介绍了ASP.NET JSP相当于包括的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在JSP中,我可以通过使用共享HTML code包括:

In JSP I can share HTML code by using include:

<jsp:include page="subsection.jsp" >

有关我的生活,我不能告诉如何在ASP.NET中我应该包括共享HTML。我可以用一个模板控制,但是这确实是不一样的东西。我可以使用一个网站母版页和内容占位符,但是这也并不相同,需要不同的方法来开发我的网页。

For the life of me, I can't tell how in ASP.NET I should be including shared HTML. I could use a template control, but this really isn't the same thing. I could use a site master page and content placeholders, but this also is not the same and requires a different approach to developing my pages.

我是运气不好还是有在ASP.NET中类似的功能JSP的包括哪些内容?

Am I out of luck or is there a function in ASP.NET similar to JSP's include?

推荐答案

您必须从服务器启用它那么不仅可以使用包括HTML文件。

You will have to enable it from the server then only you can use include html files.

<!-- #include file="Static/Menu.html" -->

指令IIS7使SSI可在的 http://tech.mikeal.com/

有关动态内容,这里的模板称为MasterPages的一个内置的方法,这应该被代替使用。

For dynamic content, there is a built-in method of templating called MasterPages, this should be used instead.

这篇关于ASP.NET JSP相当于包括的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆