Q:

How to show a sidebar in all pages in mvc4 except 2

We currently have a site which has a section LatestNews, required:false defined in the layout
and all views  except two have the section which have the same call RenderPartial("ShowLatestNews")
Is there a better way to do this ? i.e. follow the DRY principle - define it in one place and hide/not use it in those 2 views only ?
UPDATE - 
currently the layout is dynamically selected from a dbconfig based on user
Ideally we don't want to switch layout based on say controller and action combination

A:

This might now be the most eloquent solution but it's simple. In your layout page use this code for your partial:
@if (ViewBag.HideSection == null)
{
    @Html.RenderPartial("ShowLatestNews")
}

Now in the 2 controller actions you DON'T want the partial to render add this:
ViewBag.HideSection = true;

It will only hide the partial in those places you specify something in the ViewBag. It isn't evaluating true or false, just the presence of the property.

