I'm using Chromatron theme for an admin panel in my application. There is a sidebar gadget that has HTML content and with a little CSS trick it can be shown completely different.
<section class="sidebar nested">
<h2>Nested Section</h2>
<p>Lorem ipsum dolor sit amet, conse ctetur adipiscing elit. Maec enas id augue ac metu aliquam.</p>
<p>Sed pharetra placerat est suscipit sagittis. Phasellus <a href="#">aliquam</a> males uada blandit. Donec adipiscing sem erat.</p>
</section>
I want to have a Partial View that is used like this:
@Html.Partial("Path/To/Partial/View"){
<h2>Nested Section</h2>
<p>Lorem ipsum dolor sit amet, conse ctetur adipiscing elit. Maec enas id augue ac metu aliquam.</p>
<p>Sed pharetra placerat est suscipit sagittis. Phasellus <a href="#">aliquam</a> males uada blandit. Donec adipiscing sem erat.</p>
}
TBH, I want to have functionality like I have in a @for(...){ }
block.
Is this possible in Razor?
for
blocks. I want to have a trailing block where I can insert other@
razor directives or HTML content; exactly like afor
block...HtmlHelper
extension method works too, but I haven't figured out to store the HTML it uses as a view or partial view. But, really, I just had to give up the bracket block syntax for the helper function syntax.