controlled doesn't see view MVC widget
Hello,
I'm trying to create MVC widget by following this guide
I created model-view-controller classes in the MVC folder. But, some reason Controller’s Index action method does not see associated Index View (please see attached pics).
If I implement View using ReSharper, View gets created in the folder structure that is OUTSIDE of MVC folder: WebApp\Views\Navigation\Index.cshtml. How can I make my controller to recognize Views in MVC folder?
I'm testing on clean 5.4 installation.
Hi Denis,
I checked your code and your folder structure and they seem OK. I tried to reproduce your issue, but the action finds the Index.cshtml view. I have attached my model, controller and a view. Could you please try it on your project and see if they are OK. I've put my MVC widget on a Sitefinity page and it behaves fine. Another option is to try to create a MVC widget with the Thunder visual studio extension. You can download Thunder from here. When you install Thunder, you can right click on the MVC folder in your project and then choose Add-> New Item... from the context menu. When the add new item window appears, you need to select the Sitefinity category on the right panel of the window and then choose the Sitefinity MVC Widget with Designer option. When you click "Add", it will generate an MVC widget automatically and you can check the generated code. Feel free to write us if you have any more questions regarding the Sitefinity MVC implementation.
Kind regards,
Tosho Toshev
the Telerik team