如何在我的ASP.NET网页中显示存储在数据库中的文档 [英] how to display documents stored in the database in my ASP.NET web page

查看:72
本文介绍了如何在我的ASP.NET网页中显示存储在数据库中的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我正在开发一个用于文档共享的项目,因此客户端无需下载即可查看文档。但是可以在ASP.NET visual basic 2010中执行任何一个???

now i working on a project that is used for document sharing ,so the clients can view documents without download it. but can do this in ASP.NET visual basic 2010 any one???

推荐答案

如果要在浏览器中查看文档,它将被下载,你可以解决这个问题。



如果你已经在SQL中存储了文档的路径,那么你可以简单地使用Response.Redirect(pathtofile),这将允许用户下载文档。



或者,如果它以二进制格式存储在SQL中,您可以使用Response对象将其发送到客户端。网上有很多样本。
If you are to view a document in the browser it will be downloaded, you can't get around that.

If you have stored the path to your document in SQL then you can simply use Response.Redirect(pathtofile) and that will allow the user to download the document.

Or, if it is stored in SQL in a binary format you can use the Response object to send it to the client. There are lots of samples online.


这篇关于如何在我的ASP.NET网页中显示存储在数据库中的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆