asp.net mvc 4 - Multiple HTML-documents inside other HTML-document -
asp.net mvc 4 - Multiple HTML-documents inside other HTML-document -
i have kind of reports (varying in content , layout) can generated users. study can consist of x pages. user can setup study , on next
, study previewed. if user fine preview
able export pfd
, xls
or whatever else.
what i'm trying accomplish is, each study has template
finish html-document <html>
, <body>
, on, defining own styles
.
my preview looks like:
@foreach (var page in model.pages) { html.renderpartial("partial/_reportpage", page); }
the foreach
-loop within preview
page user can slide through pages check if , ready e.g. printed.
the problem is, styles in outer html
apply single report-page not want because later on, when user wants generate pdf
-document, same html
-code should used previewing report.
i thought using iframes
, ended problem, have pass page
object iframe
-src, post
info not possible.
antoher seek unsetting styles style="all: unset;"
in <div>
wrapped around each page. not working.
any ideas? maybe whole thought wrong. but, if so, need change?
update
at end want like:
<html> <!-- main page --> <head> ... head content ... ... style-includes ... ... script-includes ... </head> <body> <!-- @@foreach (var page in model.pages) --> <html> <!-- sub page #1 --> <head> ... sub-head content ... ... sub-style-includes ... ... sub-script-includes ... </head> <body> ... report-page #1 content own styles ... </body> </html> <html> <!-- sub page #2 --> <head> ... sub-head content ... ... sub-style-includes ... ... sub-script-includes ... </head> <body> ... report-page #2 content own styles ... </body> </html> </body>
html asp.net-mvc-4 iframe nested
Comments
Post a Comment