日期:2014-05-18  浏览次数:20968 次

MVC4 里面 section featured 是什么意思?
MVC4 生成的默认代码:@section featured {
<section class="featured">
  <div class="content-wrapper">
  <hgroup class="title">
  <h1>@ViewBag.Title.</h1>
  <h2>@ViewBag.Message</h2>
  </hgroup>
  <p>
  To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>. 
  The page features <span class="highlight">videos, tutorials, and samples</span> to help you get the most from 
  ASP.NET MVC. If you have any questions about ASP.NET MVC visit 
  <a href="http://forums.asp.net/1146.aspx/1?MVC" title="ASP.NET MVC Forum">our forums</a>.
  </p>
  </div>
</section>
}

section featured 是什么意思?


------解决方案--------------------
和MVC4没有关系。只是默认生成的项目中有一些对asp.net mvc的介绍。对于这些介绍,管它叫做“section featured”,也就是特性介绍的小节。
------解决方案--------------------
section 是语法,featured 是名称,你到_LayOut页面看到这句:@RenderSection("featured", required: false),就是为了呈现你定义的featured 这个Section