ActiveReports在ASP.NET中高度100%自适应
主要思路是通过CSS来控制WebViewer的高度,完整代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<style type="text/css">
body, html {
height: 100%;
}
body {
margin: 0px;
overflow: hidden;
}
.viewer {
height: 100%;
width: 100%;
display: inline-block;
}
</style>
</head>
<body>
<form id="form1" runat="server" class="viewer">
<ActiveReportsWeb:WebViewer ID="WebViewer1" CssClass="viewer" runat="server" Width="100%" >
</ActiveReportsWeb:WebViewer>
</form>
</body>
</html>
页:
[1]