0

I have an Composite C1 site that I am building through the web front end.

I also have an ASP.NET MVC 4 app. There's a partial in the MVC app that I'd like to include in the Composite C1 site.

I have found the MVC player but it is really unclear. It says enter a path - but there is no view or controller (not even a controllers folder) in the composite app? How can I insert a partial?

niico
  • 11,206
  • 23
  • 78
  • 161
  • Considered not using MVC? Create Razor functions instead if you have a few pages. Mvc is fine for some things, but most times you can get the job done with Razor Functions, which will be easier for you to maintain. – Poul K. Sørensen Sep 17 '13 at 14:56
  • I had to in this case. – niico Sep 17 '13 at 15:28

2 Answers2

2

I know this question is pretty old. But if you're still interested, Composite C1 V5 Beta will now support MVC functions. I've used it daily for quite a few months now. It works really well. Basically, it will allow you to call an action within a controller (just like a partial action) to render parts of your page.

Plase take a look at this blog post: http://community.composite.net/Blog/2015/10/23/Composite-C1-50-Beta-1

I know it's a beta, but it's pretty stable.

gretro
  • 1,934
  • 15
  • 25
  • Beware that MVC functions is not new to C1 5.0, its been around since Christmas 2014 and works fine in 4.3 as well. http://compositec1.codeplex.com/discussions/574748 – Pauli Østerø Jan 04 '16 at 09:25
1

Normally, you should put your controllers in /App_Code and views - in respective subfolders in /Views

Please see this guide: http://docs.composite.net/Functions/MVC/HelloWorldMVC

wysocki
  • 731
  • 5
  • 7
  • I setup the C1 site first in the web front end and installed from the .exe. There is no project in VS. Can I add partials into that site or do I require Visual Studio? – niico Sep 12 '13 at 14:00
  • I tried adding them to that site, but the /Home controller isn't working. Do I need VS and to compile it? – niico Sep 12 '13 at 14:13
  • The hello world example was great - I suggest downloading the sample & following the simple text file instructions. thx. – niico Sep 13 '13 at 11:19