1

I try to add a namespace to my viewfile (vbhtml) in an mvc project. According to this or this solution it is straight forward using @Imports NamespaceName. Unfortunately this is not working in my case. My auto-generated (strongly typed view) file looks as follows:

@ModelType MVC_AdminTry1.Models.Employee
@Code
    ViewData("Title") = "Index"
End Code
<h2>Index</h2>

I cannot use the Imports command. Or at least IntelliSense does not give me any support. Does anyone know why that is?

Community
  • 1
  • 1
ruedi
  • 5,365
  • 15
  • 52
  • 88
  • Related to this question: http://stackoverflow.com/questions/4789578/namespace-reference-in-net-mvc3-razor-view-in-vb. Doesn't answer your specific question but the answer I posted may help if the import statement doesn't appear to bring in your extension methods. – Daz Jun 30 '16 at 21:53

0 Answers0