我正在尝试创建一个自定义局部视图,该视图使用与@using(Html.BeginForm())
我已经具有与HtmlHelper扩展一起使用的视图,但是当前它需要一个字符串:@Html.InfoBox("title", "<div>Content of the box</div>")
将其称为部分视图:
<div class="info-card">
<span class="info-title">@Model.Title</span>
<div>
@Html.Raw(Model.Description)
</div>
</div>
所以我想要这样的东西:
@using(Html.InfoBox("title"))
{
<div>Content of the box</div>
}