母版页更改后如何重新生成视图?
我已将另一个 ContentPlaceHolder 添加到脚本的母版页中。当我创建视图时,新的占位符可见,但旧视图保持不变。除了手动编辑所有视图之外,还有其他方法吗?
I have added an another ContentPlaceHolder to Master Page for scripts. When I create Views new place holder is visible, but old views remain the same. Is there a way other than editing all the views by hand?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,没有。如果您想添加此新部分,则需要手动更新旧视图。
No, there isn't. Older views need to be update manually if you want to add this new section.
无论如何,您都必须编辑现有视图才能添加新内容。
如果现有视图不需要新 ContentPlaceHolder 中的任何内容,那么您可以保持它们不变,并且在显示视图时不会为该 ContentPlaceHolder 呈现任何内容。
You would have to edit the existing views anyway to add the new content.
If the existing views don't need any content in the new ContentPlaceHolder, then you can leave them untouched and nothing will be rendered for that ContentPlaceHolder when the view is displayed.