Calling RenderPartial from an Area
This is my folder structure
I wan to call 开发者_开发百科a partialview from my view on my area
You could specify the full location of the view when rendering it:
<% Html.RenderPartial("~/Areas/User/Views/SomeController/Foo.ascx"); %>
UPDATE:
And in order to call a partial from the Shared
folder:
<% Html.RenderPartial("~/Views/Shared/Foo.ascx"); %>
geocine, please try this one.
<% Html.RenderPartial(Url.Content("~/Views/Shared/Foo.ascx")); %>
Does it solve your problem?
精彩评论