check response.contenttype = "application/pdf", did you set the proper content type? does your client have Adobe Acrobat Reader installed?Response.Clear();
Response.ContentType=dr["personimagetype"].Tostring();
Response.Addheader("Content-Disposition", "inline; filename=ado.pdf");
byte[] bs = (byte[]) dr["personimage"];
Response.AddHeader("Content-Length", bs.Length.ToString());
Response.BinaryWrite(bs);
Response.End();
Response.ContentType=dr["personimagetype"].Tostring();
Response.Addheader("Content-Disposition", "inline; filename=ado.pdf");
byte[] bs = (byte[]) dr["personimage"];
Response.AddHeader("Content-Length", bs.Length.ToString());
Response.BinaryWrite(bs);
Response.End();
解决方案 »
- vs2005先新建个解决方案,在添加类库项目,怎么总是类库不再解决方案下面
- 发邮件问题
- |zyciis| 如何来判断当前网站中是否有当前请求的页面
- DIV坐标问题~高手请进!
- Type 'Database' is not defined.
- VS.net 与 Asp.net 与 .net framework都是什么概念?我都模糊了.VS.net=Asp.net吗?
- 弹出窗口之挥泪大送分
- 如何在datagrid中加入添加新記錄功能?
- 关于字符串截取问题
- 如何操作Repeater控件中嵌套DropDownList控件?
- 怎样实现类似DropDownList的Items属性?我写的设置不了属性的值(附代码)
- 一个解决方案,里面有四个项目,其中一个项目里设置了一个session,而在另一个项目里无法得到这个session
<param name="_Version" value="65539">
<param name="_ExtentX" value="20108">
<param name="_ExtentY" value="10866">
<param name="_StockProps" value="0">
<param name="SRC" value="illustrator.pdf">
</object>
这段代码有点问题!
提示说Addheader没定义之类的!
另外我想问的是:ado.pdf是?
Response.Addheader("Content-Disposition", "inline; filename=ado.pdf");
Response.AddHeader("Content-Length", bs.Length.ToString());
这两语句是什么意思,谢谢
思归兄弟!
你的这段代码我怎么看不懂啊
解释解释!
Content-Length定义Http Response的内容的长度Two common ways of presenting multipart electronic messages are as a
main document with a list of separate attachments, and as a single
document with the various parts expanded (displayed) inline. The
display of an attachment is generally construed to require positive
action on the part of the recipient, while inline message components
are displayed automatically when the message is viewed. A mechanism
is needed to allow the sender to transmit this sort of presentational
information to the recipient; the Content-Disposition header provides
this mechanism, allowing each component of a message to be tagged
with an indication of its desired presentation semantics.