views:

70

answers:

1

I'm trying to include a partial in a view. Both the partial and the view are in an MVC Portable Area. Here's the code in the view:

<% Html.RenderPartial("Here"); %>

Here's the partial (named Here.ascx and located in the Shared folder of my portable area):

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
    <p>
        Here
    </p>
    <p>
        You found me.
    </p>

The result is: The partial view 'Here' was not found. I've also tried specifying the relative path to this partial too, but with no luck. Any ideas?

A: 

All views (and partials and templates) must be embedded resources rather than content files. You define this in the "Build Action" property. To make a partial an embedded resource, highlight it in Solution Explorer and press the F4 key, or right-click it and select Properties from the context menu.

triskelion