下载和上传与ASP.net图片 [英] Download and upload images with ASP.net

查看:94
本文介绍了下载和上传与ASP.net图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的web应用程序,我需要能够允许用户上传和下载他们的图像。这怎么可能不要在ASP.net?

In my web application, I need to be able to allow users to upload and download their images. How can this be don in ASP.net?

欲用户能够登录(我已经有完成),并且能够将图像上传到他们的帐户。后来,我希望他们能够下载。

I want to user to be able to sign in (I already have that done) and be able to upload images to their account. Later on, I want them to be able to download them.

感谢

推荐答案

如果该图像是一个合理的规模(例如超过几MB以内),你可以用&LT做到这一点;标签。设置你的表单标签的编码为multipart / form-数据,并实现一些code-背后获得文件的举行。

If the images are of a reasonable size, (e.g. less than a few MB), you can do this with a <input type=file> tag. Set the encoding of your form tag to multipart/form-data and implement some code-behind to get a hold of the file.

查看ASP.Net的视频(第1部分)和( 第2部分)。

See the ASP.Net videos (Part 1) and (Part 2) for a detailed example.

希望这有助于!

这篇关于下载和上传与ASP.net图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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