render a PartialView via Html.RenderAction

Topics: General
Jul 19, 2011 at 5:40 AM

dear Team

i have View where I want to render a PartialView via Html.RenderAction. The problem is, that i get an exception that the Controller can not be found.

i am writing sumthing like this

 

 @{
                                Html.RenderAction("ApplyRating","Rating",new RouteValueDictionary(new { id = CurrentUserRatingId, contentId = item.Id, currentRating = AverageRating, cType = "Property", ratingType = "TravellersRating", isAverageRating = true }));
                             }          

 

Do i need to specify the Area if yes then how to specify it in a RouteValueDictionary.

Thanx

Mourice

Jul 19, 2011 at 6:49 AM

I wrote this and issue is resolve. Anyways thanx. 

Html.RenderAction("ApplyRating","Rating",new  RouteValueDictionary(new { area =  "CentraLogic.Common",  id = CurrentUserRatingId, contentId = item.Id, currentRating = AverageRating, cType = "Property", ratingType = "TravellersRating", isAverageRating = true }));