2016-09-20 128 views
1

如何更改HTML,使所有新添加的视图,如编辑,详细信息,列表视图具有该HTML而不是默认的HTML。更改默认的视图的HTML

例如相反,默认的HTML(下一个)

<h3>ListPage</h3> 

<p> 
    @Html.ActionLink("Create New", "Create") 
</p> 
<table class="table"> 
    <tr> 
     <th> 
      @Html.DisplayNameFor(model => model.PO_PoolName) 
     </th> 
     <th> 
      @Html.DisplayNameFor(model => model.PO_Code) 
     </th> 
    </tr> 
</table> 

我想下面的默认HTML提前

<h3 class="page-header">ListPage</h3> 
<div class="section-container section-with-top-border"> 

    <!-- begin panel --> 
    <div class="panel pagination-inverse m-b-0 clearfix"> 
     <div class="row"> 
      <div class="col-lg-12"> 
       <span class="pull-right "> 
        <a href="/Pools/Create" class="btn btn-lime btn-sm"> 
         <i class="fa fa-fw fa-plus"></i> 
         Create New 
        </a> 
       </span> 
      </div> 
     </div> 
     <table id="data-table" data-order='[[1,"asc"]]' class="table table-bordered table-hover"> 
      <thead> 
       <tr class="inverse"> 
        <th>@Html.DisplayNameFor(model =>model.PO_PoolName)</th> 
        <th>@Html.DisplayNameFor(model => model.PO_Code)</th> 
       </tr> 
     </table> 

感谢

+2

请澄清你想要什么,你的问题不清楚。你想要CSS,还是想要显示某些部分视图取决于某些标准?你在这里说的是默认情况下的CSS - 你不显示任何CSS,只需html – Pete

+0

我想改变视图模板。 – Meer

+0

@ user3079351,你是什么意思模板?你想改变网页的布局? –

回答

0

我找到解决办法

我修改和改变的的HTML t4模板下面的目录

C:\ Program Files(x86)\ Microsoft的Visual Studio 14.0 \ Common7 \ IDE \扩展\微软\网络\的mvc \脚手架\模板\ MvcView

这对我来说很好地工作。