What are the differences between strongly-type view and normal view in asp.net MVC?
When I add a View by right click on my Controller into my asp.net MVC project, I have checked a checkbox named Create a strong-typed view. What are the things will change when I checked that checkbox?
Thanks.
With strongly typed views, your view file will have the following directive
at the top of the file
This signifies to the view that
@Htmlhelpers and@Modelhelpers will interact with a class of that type.For example
Assuming
MyPropertyis a property onYourModelclass.You can create your views manually, and just add the
@modeldirective at the top of the page yourself.