In my controller, the view is returned as usual
return new View(myModel);
What I would like is to add some extra code to the view. E.g. under a certain condition, to "wrap" the whole view markup inside a @section. For example, my view is
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
And after processing the controller's action, I want the view returned to be
@section MySection{
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
}
Is it possible?
Thanks