Reputation: 11
This is the code i call in _Layout.cshtml
:
<head>
<link rel="icon" runat="server" [email protected]("~/myicon.ico") type="image/ico" />
</head>
But icon don't show . I only get this default icon
Upvotes: 0
Views: 964
Reputation: 2600
I think you want Url.Content, not Url.Action
<link rel="icon" runat="server" [email protected]("~/myicon.ico") type="image/ico" />
Url.Content resolves the path and returns the URL. Url.Action is used when you actually want to call a controller action and do something with the result.
Upvotes: 1