I created an Asp.NET MVC 3 web application. However, when I try to deploy it, I get this error.
'ModelType' is not declared. It may not be available due to its level of protection.
on the second line of code where I declare my type of model. It works fine locally where MVC 3 is installed, but not on the server where it is missing. I have included the entire DLL that usually needs to be run without installation. Also this code works fine on another server where MVC 3 is not installed, so I'm not sure what the problem is.
here is the beginning of the code:
@Imports System.Data.SqlClient
@ModelType SqlDataReader
@Code
Layout = Nothing
End Code
it does not work in the second line
source
share