DaiBan.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:8k
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DaiBan.aspx.cs" Inherits="DaiBan" %>
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head id="Head1" runat="server">
- <title>基于WebForms的操作Word</title>
- <meta name="GENERATOR" content="Microsoft Visual Studio 7.0"/>
- <meta name="CODE_LANGUAGE" content="C#"/>
- <meta name="vs_defaultClientScript" content="JavaScript"/>
- <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"/>
- </head>
- <body style="background-color:#ffffff;" onload="soaOpen();window.focus();" onunload="soaClose();">
- <script type="text/javascript">
- var bDocOpen = false;
- function soaOpen()
- {
- var mHttpUrl=location.href;
- var mScriptName = "DaiBan.aspx?strFName";
- var a= mHttpUrl.split('=');
- var sfname="";
- var suname="";
- for (var i=0;i<a.length;i++)
- {
- switch (i)
- {
- case 0:
- break;
- case 1:
- sfname = a[i].split('&');
- sfname = sfname[0];
- break;
- case 2:
- sbl = a[i].split('&');
- sbl = sbl[0];
- case 3:
- suname=a[i];
- default:
- break;
- }
- }
- try {
- formData.SOAOfficeCtrl.UserMenuCaption = "自定义菜单(&N)";
- formData.SOAOfficeCtrl.AppendMenuItem(1, "显示痕迹(&S)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(2, "隐藏痕迹(&H)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(3, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(4, "显示标题(&T)");
- formData.SOAOfficeCtrl.AppendMenuItem(5, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(6, "全文手写批注(&D)");
- formData.SOAOfficeCtrl.AppendMenuItem(7, "插入印章(&I)");
- formData.SOAOfficeCtrl.AppendMenuItem(8, "接受所有修订(&A)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(9, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(10, "分层显示手写批注(&G)");
- formData.SOAOfficeCtrl.Caption="芜湖易通信息技术有限公司--在线文档编辑器";
- formData.SOAOfficeCtrl.SaveDocURL = "SaveDoc.asp";
- if (sbl=="false") {
- formData.SOAOfficeCtrl.Toolbars = false;
- formData.SOAOfficeCtrl.Titlebar = false;
- formData.SOAOfficeCtrl.Menubar = false;
- }
- formData.SOAOfficeCtrl.WebOpen(sfname,0,"<%=SUserName%>");
-
- return true;
- }
- catch (e)
- {
- var ErrorMsg = '未定义的意外错误。';
- alert(e.description);
- WEBWORD_OBJECT.innerHTML="<div align=center><b><font color=red>文档加载失败,错误信息:"+e.description+"</font></b></div>";
- return false;
- }
- }
- function soaClose()
- {
- try {
- if (bDocOpen)
- formData.SOAOfficeCtrl.Close();
- return true;
- }
- catch (e)
- {
- alert("关闭文档失败!n错误信息:"+e.message);
- return false;
- }
- }
- //文档另存为Html,并发布到web服务器
- function SaveAsHtml()
- {
- try {
- alert("绿色版没有提供另存HTML的功能。");
- //formData.SOAOfficeCtrl.WebSaveAsHtml();
- }
- catch (e)
- {
- alert("保存为Html失败!n错误信息:" + e.message);
- }
- }
- </script>
- <script type="text/javascript" language="JavaScript" event="OnDocumentOpened(str, obj)" for="SOAOfficeCtrl">
- bDocOpen = true;
- </script>
- <script type="text/javascript" language="JavaScript" event="OnDocumentClosed()" for="SOAOfficeCtrl">
- bDocOpen = false;
- </script>
- <%--<script type="text/javascript" language="JavaScript" event="OnUserMenuClick(index, caption)" for="SOAOfficeCtrl">
- if(index == 1) soaShowTrack(true);
- if(index == 2) soaShowTrack(false);
- if(index == 4) alert("该菜单的标题是:"+caption);
- if(index == 6) soaStartHandDraw();
- if(index == 7) soaInsertSeal();
- if(index == 8) soaAcceptAllRevisions();
- if(index == 10) soaShowHandDrawDispBar();
- </script>--%>
-
- <form method="post" id="formData" runat="server">
- <table cellspacing="0" cellpadding="0" width="100%" border="0" >
- <tr>
- <td style="height:4;"></td>
- </tr>
- </table>
-
- <%--<table style="height:10;" cellspacing="0" cellpadding="0" width="100%" border="0">
- <tbody>
- <tr>
- <td style="width:10; height:10;" align="left" > <img alt="" src="image/b_word2.GIF" width="10" height="10"/></td>
- <td style="width:98%;" align="center"></td>
- <td style="width:10;" align="right"><img alt="" src="" width="10" height="10"/></td>
- </tr>
- </tbody>
- </table>--%>
- <table style ="height:21; background-color:#eeeeee;" cellspacing="0" cellpadding="0" width="100%" border="0" >
- <tbody>
- <tr>
- <td style="width:6; background-color:#FFFFFF;"> </td>
- <td style="font-size:9pt; width:120;"> SOAOffice2007 控件 </td>
- <td><span class="ltsep">|</span></td>
- <td style="font-size:9pt; width:177;"> 当前操作模式:<font color="#FF0000">修改无痕迹</font></td>
- <td><span class="ltsep">|</span></td>
- <td style="font-size:9pt; width:400"> 文档主题:<input name="inputSubject" class="thinInput" type="text" value="word"/><font color="#FF0000"> 双击控件标题栏最大化运行</font></td>
- <td style="width:5; background-color:#FFFFFF"> </td>
- </tr>
- </tbody>
- </table>
-
- <table cellspacing="0" cellpadding="0" width="100%" border="0">
- <tbody>
- <tr valign="top">
- <td style=" overflow-x:hidden; width:10; height:100%; background-color:#FFFFFF"> </td>
- <td style="width:100%">
- <fieldset >
- <table cellspacing="0" cellpadding="0" width="100%" border="0">
- <tr>
- <td>
- <tbody>
- <tr valign="top" align="left">
- <td style="height:655"><span id="WEBWORD_OBJECT">
- <%--<object id="SOAOfficeCtrl" codebase="http://localhost:3190/Web/Workflow/SOAOffice.ocx#version=3,1,1,0" height="100%"
- width="100%" classid="clsid:BBD0982A-63C3-4105-B7AF-5FF3E2649082" data="">--%>
- <object id="SOAOfficeCtrl" codebase="<%=BaseUrl%>SOAOffice.ocx#version=3,1,1,0" height="100%"
- width="100%" classid="clsid:BBD0982A-63C3-4105-B7AF-5FF3E2649082" data="">
- <%--<param name="Server" value="<%=ServerIP%>">--%>
- <param name="ServerPort" value="4357"/>
- <param name="BorderStyle" value="0"/>
- <param name="TitleBarColor" value="16777215"/>
- <param name="TitlebarTextColor" value="0"/>
- <%--<param name="MenubarColor" value="<%=menubarColor%>">
- <param name="MenubarStyle" value="<%=Int((6 * Rnd()) + 1)%>">--%>
- <span style="color:red">未能载入SOAOfficeCtrl文档控件。请在安装控件的提示对话框里确认安装,才能使用本控件的功能。</span>
- </object>
- </span>
- </td>
- </tr>
- </tbody>
- <%-- http://localhost:3190/Web/Workflow/DocTemplate项目预算表.doc--%>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- <td style="overflow:hidden; width:10; height:100%; background-color:#FFFFFF;"> </td>
- </tr>
- </tbody>
- </table>
-
- </form>
- </body>
- </html>