如何在asp.net mvc 视图中使用flexpaper插件
步于 2016-09-24 11:22:34 网上也有很多关于asp.net 使用flexpaper 做在线文档的列子。学习后已在项目中正常使用。最近在学习MVC 却不知如何在这用flexpaper。 我复制了原来的代码在view中。结果没有显示插件。望知道的小伙伴们不吝赐教。
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts
{
<script src="@Url.Content("~/Scripts/jquery.js")"></script>
<script src="@Url.Content("~/Scripts/flexpaper_flash.js")"></script>
<script src="@Url.Content("~/Scripts/flexpaper_flash_debug.js")"></script>
}
<h2>Index</h2>
<div id="detail_main">
<a id="viewerPlaceHolder" style="width:100%;height:280px;display:block; background-color:aqua"></a>
<script type="text/javascript">
ldp();
function ldp()
{
var fp = new FlexPaperViewer(
'FlexPaper/FlexPaperViewer',
'viewerPlaceHolder',
{
config: {
SwfFile: escape('Files/SWF/3751.swf'),
//SwfFile:escape('<%= GetDrawingSWFPath() %>'),
Scale: 0.6,
ZoomTransition: 'easeOut',
ZoomTime: 0.5,
ZoomInterval: 0.2,
FitPageOnLoad: true,
FitWidthOnLoad: true,
PrintEnabled: false, PrintToolsVisible: false,
FullScreenAsMaxWindow: false,
ProgressiveLoading: true,
MinZoomSize: 0.6,
MaxZoomSize: 7,
SearchMatchAll: false,
InitViewMode: 'Portrait',
ViewModeToolsVisible: true,
ZoomToolsVisible: true,
NavToolsVisible: true,
CursorToolsVisible: true,
SearchToolsVisible: true,
localeChain: 'en_US'
}
});
};
</script>
</div>