如何在asp.net C#中上传pdf,txt,doc,docx文件 [英] how to upload pdf, txt, doc, docx file in asp.net c#

查看:111
本文介绍了如何在asp.net C#中上传pdf,txt,doc,docx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请有人告诉我如何在asp.net c#的文件夹和数据库中上载,保存txt,doc,docx文件,我可以上载pdf文件,但不能上载其他扩展名文件,所以请帮助....此代码.

Pls some one tell that how to upload, save txt, doc, docx file in folder and in database in asp.net c#, I am able to upload pdf files, but not able to other extension files, So Pls some one help.... for this code.

推荐答案

完全没有区别上传哪种文件.
(此外,在所有现代文件系统中,都没有所谓的扩展名".不再是.这只是Windows的传统,保留了旧的DOS时间,仅在Shell和文件类型关联"中使用.) >
您的但无法访问其他扩展文件"可能只是您的错觉.尝试重现并详细描述出了什么问题,您将发现该问题实际上并不存在.

—SA
There is absolutely no difference what kind of file to upload.

(Also, in all modern file systems, there is not such think as "extension". Not anymore. This is just a Windows tradition preserved from old DOS time which is only used in Shell and "file type associations".)

Your "but not able to other extension files" is probably just your illusion. Try to reproduce and describe what''s going wrong in detail and you will see that the problem does not really exist.

—SA


这些链接应该可以帮助您入门-
使用ASP.NET上传文件 [在ASP.NET 2.0中上传文件 [ http://msdn.microsoft.com/en-us/library/aa478971.aspx [ ^ ]
These links should help you get started -
File Upload with ASP.NET[^]
Upload Files in ASP.NET 2.0[^]
http://msdn.microsoft.com/en-us/library/aa478971.aspx[^]


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

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