上传&使用C#在asp.net中下载文件 [英] Uploading & Downloading files in asp.net using C#

查看:85
本文介绍了上传&使用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
展开 | 选择 | Wrap | 行号


这篇关于上传&使用C#在asp.net中下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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