ASP.NET中的所有类型的文件上载和视图 [英] All type of File Upload and view in ASP.NET

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

问题描述

您好,我正在开发一个asp.net,C#网站,其中我想要从桌面上传任何类型文件(视频,音频,ppt,pdf,word等)的建议,并在网站上查看并上传完成。我正在寻找一些有效而简单的方法来做到这一点。我正在使用SQL Server。请更具体,因为我在这种情况下缺乏文件上传,路径给予等知识。

P.S我开始这样做,所以在开始代码之前我需要更好的选择建议。我为此搜索了很多。但是,由于这是我最喜欢的网站之一,我在这里发帖提问需要一些帮助。 :)

谢谢。 :)

Hello, I am developing an asp.net, C# website in which I want suggestions for uploading any type file that is video, audio, ppt, pdf, word etc. from desktop and view it in website and upload is complete. I am looking for some efficient and easy ways to do this. I am using SQL Server. And please be more specific because I lack knowledge in this case that is file uploading, path giving, etc.
P.S I am starting this, so before I start code I need suggestions for better options. I have searched a lot for this. But yet as this is one of my favourite website, i am posting question here expecting some help. :)
Thank you. :)

推荐答案

你上传什么样的文件类型无关紧要。



最简单的上传方式是?

It absolutely does not matter what kind of "file type" do you upload.

The simplest way to upload?
<html>
<body>

<form action="someURI" method="post" enctype="multipart/form-data">
<!-- ... -->
<input type="file" name="file" id="file" /></br>
<input type="submit" name="submit" value="Submit" />

</form>

</body>
</html>





在处理的HTTP请求中在服务器端,您将使用属性name的值来识别文件数据,在本例中为file。



详情请见: http ://msdn.microsoft.com/en-us/library/aa479405.aspx [ ^ ]。



-SA


这篇关于ASP.NET中的所有类型的文件上载和视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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