RenderPartial from different folder in RAZOR
- by Dien
I've been trying to convert my aspx pages to cshtml and having an issue with rendering partial pages from another folder.
What I used to do:
<% Html.RenderPartial("~/Views/Inquiry/InquiryList.ascx", Model.InquiryList.OrderBy("InquiryId", MvcContrib.Sorting.SortDirection.Descending));%>
I would think that the equivalent would be:
@Html.RenderPartial("~/Views/Inquiry/_InquiryList.cshtml", Model.InquiryList.OrderBy("InquiryId", MvcContrib.Sorting.SortDirection.Descending))
This is obviously not working, I am getting the following error.
  CS1973:
  'System.Web.Mvc.HtmlHelper'
  has no applicable method named
  'Partial' but appears to have an
  extension method by that name.
  Extension methods cannot be
  dynamically dispatched. Consider
  casting the dynamic arguments or
  calling the extension method without
  the extension method syntax.
How would I achieve this with using the Razor view engine?