We've just updated ASP.NET from Preview 3 to Preview 5 and we've run into a problem with the Html.Image
HtmlHelper in our aspx pages.
It seems that Html.Image
has moved from System.Web.Mvc
into Microsoft.Web.Mvc
, and the only way we've found to access the helper now is to add an import statement to every .aspx page that uses it. All the other helpers can be accessed with using System.Web.Mvc;
in the C# codebehind of a view master page, but this one seems to need an <@Import Namespace="Microsoft.Web.Mvc">
in every .aspx page.
Does anyone know of a way around this?
You can add the namespace to pages in System.Web in you web config.
<pages validateRequest="false">
<namespaces>
<add namespace="Microsoft.Web.Mvc"/>
</namespaces>
</pages>
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