I am starting to create MVC 5 applications. But in controller, right click inside Create action method, select Create View. Menu comes up, where I can select model, etc., but there is no longer an option to select "Create strongly-typed view". See screenshot below
cshtml View: In order to create a strongly typed view in ASP.NET MVC Application, we need to specify the model type within the view by using the @model directive.
What is Strongly Typed View. The view which binds to a specific type of ViewModel is called as Strongly Typed View. By specifying the model, the Visual studio provides the intellisense and compile time checking of type. We learnt how to pass data from Controller to View in this tutorial.
Hi MVC3/ or Visual Studio 2015 does not give option to select 'Strongly typed view', instead following steps need to carry out to implement strongly typed views.
Build your project before starting following steps so that you will get model in the list to select as strongly type.
Let me know in case of any queries.
VS2013 changed the language a bit. To create "strongly typed" view, trigger the create a view dialog and choose any template other than "Empty (without model)". You should now be able to choose your Model from the "Model Class" dropdown. Doing this will create the equivalent of a strongly typed view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With