I also was looking for a solution and jQuery helped pretty much. First, you need to give 'id's to your <li>
elements.
<li id="listguides"><a href='/Guides/List'>List Guides</a></li>
After doing this in your layout page, you can tell jQuery which <li>
element should be 'selected' in your view.
@section Scripts{
<script type="text/javascript">
$('#listguides').addClass('selected');
</script>
}
Note: You need to have @RenderSection("scripts", required: false)
in your layout page, just before the </body>
tag to add that section.