Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying to open a view from a surface controller, but the view responds with:
The type or namespace name 'propertySearchResultsModel' could not be found (are you missing a using directive or an assembly reference?)
public class PropertySearchResultsModel : RenderModel
public class ApartmentSearchSurfaceController : Umbraco.Web.Mvc.SurfaceController
public ActionResult ApartmentSearch(ApartmentSearchViewModel model)
return View("~/Views/searchResults.cshtml", propertySearchResultsModel);
Layout = "siteTemplate.cshtml";
I have ready other posts on this topic (i.e. https://our.umbraco.org/forum/templating/templates-and-document-types/43193-Current-page-in-view#comment-155630), and I believe I am on the right path, but I'm still struggling. Any help would be greatly appreciated.
I think it's just a typo. Your model type is called PropertySearchResultsModel but you have used it as propertySearchResultsModel in the view. If you make the "p" uppcase it should be fine.
If not then:
how do you call your controller method?
and why have you inherited from RenderModel?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted