In relation to my previous question, I want to set the returned List<Class1> listClass
in my .cshtml file. However, I cannot create the following code in the .cshtml file since it does not recognize the Class1 class:
@ {
List<Class1> listClass = new List<Class1>();
}
<html>
<!-- code for the view goes here -->
</html>
Class1 and the .cshtml file are located in different namespaces.
Add the namespace your Class1 is located in, in a @using
statement