我如何在MVC3中以html或字符串的形式获取当前页面 [英] How can i get the current page as html or string in MVC3
本文介绍了我如何在MVC3中以html或字符串的形式获取当前页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我正在尝试做一个应用程序,该应用程序在所有页面上都有一个另存为pdf"按钮,当用户单击该按钮时,它应该获取内容并将其另存为pdf.
我知道如何将html转换为pdf,但是问题是,我不知道如何将页面的内容转换为字符串.
我正在尝试获取内容,但没有运气,我可以获取视图,但我不仅希望将完整的页面另存为html.
请帮助大家.
谢谢.
Hi
I am trying to do an application, which will have a save as pdf button on all the pages, when a user clicks the button it should get the contents and save it as pdf.
I know how to convert the html to pdf, but the problem is, i don''t know how to get the contents of the page into a string .
I am trying to get the content but no luck, i can get the view but i want the complete page not only the view to be saved as html.
please help guys.
thanks.
推荐答案
小型google搜索(3秒)导致:
http://weblogs.asp.net/kiyoshi/archive/2009/02/14/render-aspx-page-as-a-string.aspx [
small google search (3 seconds) leads to:
http://weblogs.asp.net/kiyoshi/archive/2009/02/14/render-aspx-page-as-a-string.aspx[^]
这篇关于我如何在MVC3中以html或字符串的形式获取当前页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文