开发者

ASP.net MVC - Can I tell Html.Partial where to find the view?

I have a view that lives in /Views/Projects and I am making a call to render a partial view:

@Html.Partial("_NotesPartial")

The view that I want to render actually exists in the /Views/Notes folder but I can't figure out how to tell MVC to search that folder for this specific call. Is there an overload I can call to have MVC look for this view in this folder instead of开发者_StackOverflow社区 Projects and Shared?


Can you pass in the full path?

@Html.Partial("~/Views/Projects/_NotesPartial.cshtml")
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜