gpt4 book ai didi

c# - Renderpartial 在共享文件夹的子文件夹中。如何让MVC找到它?

转载 作者:行者123 更新时间:2023-11-30 17:21:04 25 4
gpt4 key购买 nike

简短但简单?

我有一个 edit.ascx 在共享文件夹中。我这样调用它:

<% Html.RenderPartial("edit", item.hlpb_ID); %>

如果我把它放在子文件夹中,它找不到文件,如何解决?

最佳答案

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

关于c# - Renderpartial 在共享文件夹的子文件夹中。如何让MVC找到它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3761497/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com