开发者

Calling RenderPartial from an Area

This is my folder structure

Calling RenderPartial from an Area

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜