I created the helper class
namespace SEM.API.Helpers
{
public static class Navigation
{
public static string BuildSomething(this HtmlHelper helper)
{
return "empty";
}
}
}
And added the namespace to webconfig <add namespace="SEM.API.Helpers" />
but I still getting an error:
CS1061: "System.Web.Mvc.HtmlHelper"
It isn't solved after a lot of rebuilds
and added namespace to webconfig
<add namespace="SEM.API.Helpers" />
Make sure you did this in ~/Views/web.config
and not in ~/web.config
.
Another thing to try is to add the @using
directive to your view:
@using SEM.API.Helpers
@Html.BuildSomething()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With