How to Render a partial view

Oct 1, 2010 at 6:52 AM

Hi Team,

 

As we do with MVC insert partial view on some part of page by,

 

<% Html.RenderAction("GetDataList", "Home", new { area = "TestModule" }); %>

 

Where in controller action I return object to view (partial view)

 

I done this in orchard but came with an error :-

“Multiple types were found that match the controller named 'Home'. This can happen if the route that services this request ('TestModule/{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter. “

 

What I should do in Orchard

 

Hope you got my question

 

Thanks,

Rajan J Dmello

Oct 1, 2010 at 9:59 AM
Edited Oct 1, 2010 at 9:59 AM

You might need to create a Routes.cs file for your module, I think I had this problem so I added a Routes.cs file (I will double check tonight/tomorrow). Orchard.Blogs\Routes.cs is an example

Oct 1, 2010 at 12:23 PM

Thanks man I want this only but hard to get 

even i am trying with same

it's good for me if i will get proper steps

 

Thanks,

Rajan J Dmello

 

Coordinator
Nov 17, 2010 at 12:02 AM

 

I created http://orchard.codeplex.com/workitem/16804 to track this.