Start a new topic
Answered

ASP.NET MVC Controller and View in a Module

Hi,

Is there a way to use ASP.NET MVC Controller and (Partial)Views in a module instead of AngularJs and JavaScript?


So instead of WebApi controller, I want to use a Controller and use (Partial)Views for the user interface. I guess that it isn't possible right now. But I would like to examine the possibility to make this works. If someone can point me to the right direction, I will try to find some way to do it. If accepted by the community I could then contribute it to the VirtoCommerce.


The documentation says:

Managed code allows to:

add new Web API controllers

add new services

override existing services

modify database


I plan to investigate the possibility to add "Add new Controller and (Partial)Views" to this list.


Is there a way? Can anyone point me to the right direction, please?


Thanks in advance.


Best Answer

Hi Sam,


Just start creating module as described in the documentation but instead of returning and rendering content on the client (browser), return json with already rendered html code and simply paste it into the content. Shouldn't be hard to accomplish.

1 Comment

Answer

Hi Sam,


Just start creating module as described in the documentation but instead of returning and rendering content on the client (browser), return json with already rendered html code and simply paste it into the content. Shouldn't be hard to accomplish.

Login or Signup to post a comment