I'm trying to create the following Helper using the @helper utility present in ASP.NET MVC. The idea is to create a Panel and call to this helper from a page for set the title and the body of the panel (I want to have more than one panel on the same page for this reason I can't use layout).
Here is the helper:
@helper PanelHelper(string title, string body){
<fieldset class="fieldset-border-2">
<legend style="display: none;">Edit</legend>
<div style="display: table;">
<div style="display: table-row;">
<div class="panel-first-row" style="display: table-cell;">
<div style="border-bottom: 1px solid #cecece; padding-left: 5px; height: 25px;">
<div style="display: table; margin: 9px 0 9px 0;">
<div style="display: table-row;">
<div class="title" style="display: table-cell;">
@title
</div>
</div>
</div>
</div>
</div>
</div>
<div class="edit-row-separator" style="display: table-row;">
</div>
<div style="display: table-row;">
<div style="display: table-cell;">
@body
</div>
</div>
</div>
</fieldset>
}
And here how I would like to call to this helper:
@Helpers.PanelHelper("Customers")
{
<div style="display: table; width: 100%;">
<div style="display: table-row; width: 100%;">
................ HTML => Customer Fields ......................
</div>
</div>
}