上传&使用C#在asp.net中下载文件
Haiii Everbody,
我是这个论坛的新手,事实上这是我加入的第一个论坛。
我急需一些帮助,因为我已达到项目的截止日期。
我创建了一个asp.net网站,管理员将上传文件到连接到网页的SQL数据库。从网页上将有一个下载链接来下载这些上传的文件。我成功地将文件上传到数据库。但是关于如何使用asp.net C#直接从数据库下载文件,我脑子里没什么特别引人注目的。
请帮助我这方面。
感谢advacne
Haiii Everbody,
I''m new to this forum, infact this is the first forum i hav ever joined.
I need some help urgently as i''m reaching the deadline of my project.
I created an asp.net website, where administrator will upload files to SQL database which is connected to the webpage. From the web page there will be a download link to download those uploaded files. I have been successful in uploading files to the database. But nothing is striking in my mind regarding how to download files directly from database using asp.net C#.
Please help me in this regard.
Thanks in advacne
任何人....请回复我的帖子....非常紧急
Anyone....please reply to my post....its very urgent
你好raja471,
非常乐意提供帮助。但是,首先我们需要更多信息。
您是否将文件存储在BLOB字段中?请发布您目前为止的代码,以便我们为您的问题/问题提供最合适的解决方案。
Happy Coding,
CroCrew~
Hello raja471,
Glad to help out. But, first we are going to need more information.
Are you storing the files in a BLOB field? Please post the code that you have so far so that we can provide you with the best fit solution to your question/problem.
Happy Coding,
CroCrew~
感谢您的回复。
以下是我的aspx.cs文件,用于从数据库上传和下载文件。 />
我在sql数据库中创建了一个表,其中包含
Thank you for the reply.
The following are the my aspx.cs files for uploading and donwloading files from the database.
I have created a table in sql database which has columns like