如何用 Spark 返回部分视图?
我正在使用 SparkViewEngine,并且正在调用一个操作,我想要返回部分视图以仅更新页面的一部分。当我返回操作视图时,母版页及其所有内容都会返回。如何告诉 Spark 中的局部视图仅返回局部视图的内容而不将内容放入 application.spark 文件中?
I am using the SparkViewEngine and I am calling an action that I want to return a Partial View to update just a section of the page. When I return the view on the action the masterpage and all of its content gets returned. How do you tell a partial in spark to just return the content of the partial view and not put the content inside the application.spark file??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您返回 PartialViewResult 吗?
如果您使用 PartialView(),application.spark 将被忽略。
Do you return PartialViewResult?
If you use PartialView(), application.spark is ignored.