开发者

Renderpartial in subfolder of Shared folder. How to make MVC find it?

开发者 https://www.devze.com 2023-01-17 12:40 出处:网络
Short but simple? I have an edit.ascx is in the shared folder. I call it like this: <% H开发者_如何学Pythontml.RenderPartial(\"edit\", item.hlpb_ID); %>

Short but simple?

I have an edit.ascx is in the shared folder. I call it like this:

<% H开发者_如何学Pythontml.RenderPartial("edit", item.hlpb_ID); %>

If I put it in a subfolder, it cant find the file, how to fix that?


In terms of how you arrange your views, you can put your views in subfolders if you'd like and create your own view structure. All views can always be referenced by their full path using the ~syntax. So if you put Index.aspx in \Views\Feature1\Home then you could reference that view using ~/Views/Feature1/Home/Index.aspx.

-- asp.net mvc - subfolders

0

精彩评论

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