开发者

How to load html in <iFrame>

I am storing html of error pages of my site in sql table, i want to display them in a window, on the admin side, but not able to load the saved html in iframe, i a开发者_运维问答m using asp.net mvc2.

its needed to save the pages, and display later to admin.

please suggest me right direction.

Thank you.


If you want it in an iframe, just write a severside script that takes this HTML and wraps it in a HTML doc dynamically: .... etc. Make this script publicly visible and pass some params to tell it what to display:

http://www.foo.com/iframescript.asp?html_display_params=saved_html

then:

<iframe src="http://www.foo.com/iframescript.... 

or: $('#iframeid').attr('src', 'http://www.foo.com/iframescript.asp....

you get the idea....

iframe means another url location, if you want to view something in an iframe it has to be it's own page.....

otherwise you want a normal frame.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜