MVC中不能使用原生态的#include ,可替代的解决方案

<!--#include file="../stuff/foo/box.aspx"-->

 

1.可以用

<%: Html.Partial("~/Views/foo/box.ascx") %>
 OR
<% Html.RenderPartial("~/Views/foo/box.ascx"); %>


2.

@Html.Raw(File.ReadAllText(Server.MapPath("~/html/test.html")))

 

posted on 2013-08-21 15:31  魔GUI  阅读(429)  评论(0编辑  收藏  举报

导航