问题描述
dsoframer不能保存,按菜单栏的保存也不行,完全不能保存有人知道怎样解决吗?<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Word.aspx.cs"Inherits="_Default"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headid="Head1"runat="server"><title>word1</title><scripttype="text/javascript">functioncommand_onclick(){//alert("<%=getpath()%>");eval(document.all.FramerControl1.Open("http://192.168.0.107/s.doc",true,"Word.Document"));}functionSaveToWeb(){//FramerControl1.SaveAs("c:\1.doc","Word.Document");document.all.FramerControl1.Save("http://192.168.0.107/m0ydoc.doc",true);document.all.FramerControl1.HttpInit();document.all.FramerControl1.HttpAddPostCurrFile("FileData","");varerr=document.all.FramerControl1.HttpPost("http://192.168.0.107/SaveDoc.aspx");if(!err)alert('保存失败!');elsealert('保存成功!');}</script></head><bodyonload="command_onclick()"><formid="formdata"method="post"runat="server"><inputid="Button1"type="button"value="button"onclick="SaveToWeb()"/><objectstyle="height:600px;"id="FramerControl1"width="100%"height="100%"codebase="dsoframer.ocx"classid="clsid:00460182-9E5E-11d5-B7C8-B8269041DD57"><paramname="_ExtentX"value="16960"/><paramname="_ExtentY"value="13600"/><paramname="BorderColor"value="-2147483632"/><paramname="BackColor"value="-2147483643"/><paramname="ForeColor"value="-2147483640"/><paramname="TitlebarColor"value="-2147483635"/><paramname="TitlebarTextColor"value="-2147483634"/><paramname="BorderStyle"value="1"/><paramname="Titlebar"value="0"/><paramname="Toolbars"value="0"/><paramname="Menubar"value="0"/></object></form></body></html>服务器的也不能保存,能创建文件,但是打开后是空白的BinaryReaderbReader=newBinaryReader(Request.InputStream);stringstrTemp=Encoding.GetEncoding("iso-8859-1").GetString(bReader.ReadBytes((int)bReader.BaseStream.Length),0,(int)bReader.BaseStream.Length);stringmatch="Content-Type:application/mswordrnrn";intpos=strTemp.IndexOf(match)+match.Length;bReader.BaseStream.Seek(pos,SeekOrigin.Begin);stringnewFile=Server.MapPath(".")+"\mydoc.doc";FileStreamnewDoc=newFileStream(newFile,FileMode.Create,FileAccess.Write);BinaryWriterbWriter=newBinaryWriter(newDoc);bWriter.BaseStream.Seek(0,SeekOrigin.End);while(bReader.BaseStream.Position<bReader.BaseStream.Length-38){bWriter.Write(bReader.ReadByte());}bReader.Close();bWriter.Flush();bWriter.Close();
解决方案
解决方案二:
這個更強啊http://www.oracle.com/us/products/applications/autoVue/index.html
解决方案三:
我的系统是WIN7,DSO版本是2.2的