Reputation: 363
Thanks for reading this.
In the _Layout.cshtml page I use the @RenderPage to call the header:
@RenderPage("/Shared/_header.cshtml")
It has this:
<div id="Header"> Home </div>
Want to make it clickable to the default action ("Index")
When I tried this:
<div id="Header"> @Html.Action("Index", MyController") </div>
I get the error:
An opening "(" is missing the corresponding closing ")" at
@RenderPage("/Shared/_header.cshtml")
Any idea?
Upvotes: 1
Views: 3365
Reputation: 12128
You are missing the opening double-quote on MyController.
It should be:
<div id="Header"> @Html.Action("Index", "MyController") </div>
Upvotes: 2