c# - Using Partial Views in ASP.NET 5 -
i've got html file want load using partial view; however, when type
@html.p
the partial function never shows up. did partials removed in asp.net 5 or has been relocated different package? @ moment i'm using following packages:
"microsoft.aspnet.mvc": "6.0.0-beta4", "microsoft.aspnet.mvc.taghelpers": "6.0.0-beta4", "microsoft.aspnet.server.iis": "1.0.0-beta4", "microsoft.aspnet.server.weblistener": "1.0.0-beta4", "microsoft.aspnet.staticfiles": "1.0.0-beta4", "microsoft.aspnet.tooling.razor": "1.0.0-beta4"
team.html
<!-- team section --> <section id="team" class="bg-light-gray"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading">our amazing team</h2> <h3 class="section-subheading text-muted">lorem ipsum dolor sit amet consectetur.</h3> </div> </div> <div class="row"> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/1.jpg" class="img-responsive img-circle" alt=""> <h4>sayed ibrahim hashimi</h4> <p class="text-muted">co-founder</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/2.jpg" class="img-responsive img-circle" alt=""> <h4>mads kristensen</h4> <p class="text-muted">co-founder</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/3.jpg" class="img-responsive img-circle" alt=""> <h4>john papa</h4> <p class="text-muted">contributor</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> </div> <div class="row"> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/1.jpg" class="img-responsive img-circle" alt=""> <h4>brady gaster</h4> <p class="text-muted">contributor</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/2.jpg" class="img-responsive img-circle" alt=""> <h4>mike lorbetske</h4> <p class="text-muted">contributor</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/3.jpg" class="img-responsive img-circle" alt=""> <h4>danielthecoder</h4> <p class="text-muted">contributor</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> </div> <div class="row"> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/1.jpg" class="img-responsive img-circle" alt=""> <h4>naim hammadi</h4> <p class="text-muted">contributor</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> <div class="col-sm-4"> <div class="team-member"> <img src="img/team/2.jpg" class="img-responsive img-circle" alt=""> <h4>tyler hughes</h4> <p class="text-muted">contributor</p> <ul class="list-inline social-buttons"> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> </ul> </div> </div> </div> <div class="row"> <div class="col-lg-8 col-lg-offset-2 text-center"> <p class="large text-muted">lorem ipsum dolor sit amet, consectetur adipisicing elit. aut eaque, laboriosam veritatis, quos non quis ad perspiciatis, totam corporis ea, alias ut unde.</p> </div> </div> </div> </section>
@html.partial
still there. however, i'd recommend using @await html.partialasync(...)
or @{ await html.renderpartialasync(...) }
.
the html.partial
method located in microsoft.aspnet.mvc.rendering
namespace ihtmlhelper
extension in microsoft.aspnet.mvc.core
assembly (pulled in microsoft.aspnet.mvc
) beta4.
what might seeing if type @html.
without pressing p
razor editor treat .
end of sentence period until stop typing bit.
hopefully helps!
Comments
Post a Comment