Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法只打印当前渲染的视图,不包括它周围的主布局?我正在生成一份报告并想打印它,但想排除除报告(Report.cshtml)本身之外的所有内容。我认为 javascript 可以启动打印对话框,但这给了我整个页面。有什么建议么?
设置查看这个:
@{ Layout = null; //or set url to another master layout }