我用以下的代码想用ie直接打开一个.dwg文件为什么不行
Response.ContentType ="application/octet-stream";
FileStream fs22 = new FileStream("e:\\aa\\"+this.Label2.Text, FileMode.Open);
int l = (int)fs22.Length;
byte[] file = new byte[l];
fs22.Read(file, 0, l);
Response.OutputStream.Write(file, 0, l);
fs22.Close();
Response.ContentType ="application/octet-stream";
FileStream fs22 = new FileStream("e:\\aa\\"+this.Label2.Text, FileMode.Open);
int l = (int)fs22.Length;
byte[] file = new byte[l];
fs22.Read(file, 0, l);
Response.OutputStream.Write(file, 0, l);
fs22.Close();
打开,打开的时候有报错无法加在d:\Documents and Settings\yyy\Local Settings\Temporary Internet Files\content.ie5\01e7s1ez\fileopen[1].aspx
在线示例:http://www.evget.com/sample/vdraw/vdraw.htm (因为需要下载图纸,所以第一次打开比较慢一些,另外IE需要允许ActionX控件才行这是view版本的示例,只能在线浏览,如果需要在线编辑,使用标准版或者专业版本就可以了
http://www.evget.com/view/viewProductInfo.asp?productId=372
http://www.evget.com/sample/vdraw/vdraw.htm
如果看不了,应该是IE设置的原因,我们这里刚测试过没有问题,请到IE的安全设置中对ActiveX进行一下设置就可以了
免费的