When using mvc, using a strong view in the view does not work. Adding a namespace reference to the web. config file does not work. Solution: mvcweb. config
This is the model code in the view:
@ Model t_user_info
This is the only code for the web. config configuration file:
<Namespaces> <add namespace = "System. web. mvc "/> <add namespace =" System. web. mvc. ajax "/> <add namespace =" System. web. mvc. html "/> <add namespace =" System. web. optimization "/> <add namespace =" System. web. routing "/> <add namespace =" CeramicMasterApp "/> <add namespace =" CeramicMasterApp. models "/> <! -- After adding 20160804, restart VS --> </namespaces>
In this way, you do not need to add the following code to each view that uses the model:
@ Using CeramicMasterApp. Models;
However, after adding a model, you need to restart vs. Otherwise, an error is reported because the model cannot be identified.