使用Web表单&上载文件(.doc,.docx,.pdf,.txt等)到资料库C#代码

使用Web表单&上载文件(.doc,.docx,.pdf,.txt等)到资料库C#代码

问题描述:

我想将.doc,.docx,.pdf,.txt等文档上载到数据库.
在Web表单中,我已经上传了一个文件和一个保存按钮.如果我单击保存按钮,则上传的文件必须保存在数据库中.请向我建议解决方案,在数据库表中告知应该采用哪种数据类型.

I want to upload the document like .doc,.docx,.pdf,.txt,etc to the database.
in the web form i have taken one file-upload and one save button . if i click the save button than the uploaded file have to save in the database . Please suggest me the solution ,tell in the database table which type of data type should have to take.

参考:
在SQL中存储和检索doc/pdf/xls文件服务器 [ ^ ]
使用C#将文件保存到SQL数据库中 [ ^ ]

从SQL Server数据库上载文件和从中下载文件 [ ^ ]

^ ]

引用类似的质量检查:
如何存储文档 [我应如何保存.doc文档到SQL Server数据库 [
Refer:
Storing and Retrieving doc/pdf/xls files in SQL Server[^]
Saving files into your SQL database with C#[^]

Uploading and downloading files to/from a SQL Server database[^]

Have a look on similar articles on CodeProject Search[^]

Refer similar QA:
How to store doc,xls,pdf,image.xml files in windows application using C#?[^]
How should I be saving .doc documents to a SQL Server database[^]