开发者

How do I display HTML in ASP.NET MVC 2?

I am writting an application to store HTML pages in a database. I would like to have a "preview" button to show the page.

What is the best way to display the HTML page on a 开发者_如何转开发MVC 2 view page? Are there any web page viewers that work with MVC?

Thanks


The best web page viewer I've seen is Google Chrome.

If you're storing HTML in the database, then it's presumably just going to be a string. Therefore, if you're doing a preview box, why not do it in a lightbox, like Colorbox?


If the HTML stored in the database is a complete page, I would say put it in either a separate frame, or just put it in an iframe on the page.

You could do this by having a controller action and view that simply renders the html from the database, then use that as the source for you frame/iframe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜