Click here to Skip to main content
15,904,155 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sir,
How to upload Power point presentation in sql server using asp application
and also how to show uploaded PPT to user
Please help me....
Posted

Please see the sample table.
C#
create table uploadtest
(
id int primary key,
filename varchar(500),
filecontent varbinary(max)
)


I have attached a sample working solution for demo purposes in the below thread.

http://www.c-sharpcorner.com/Forums/Thread/179342/how-to-upload-and-retrieve-files-from-database.aspx

For demo purposes i have set to upload and download one file only.

Also i have used Entity framework, if you are using stored procedures, create a class with the above columns as properties and set the values or directly pass the stored proc content to filename and file content.


You can just upload ur ppt and test how it works
 
Share this answer
 
Take Table as


id int primary key,
filename varchar(500),
filecontent varbinary(max)

if (FileUpload1.HasFile)
{
string fileName = FileUpload1.PostedFile.FileName;
string fileExtension = Path.GetExtension(FileUpload1.PostedFile.FileName);
byte[] document = FileUpload1.FileBytes;
}
and now write Query to insert document into Database

follow these links

http://www.intstrings.com/ramivemula/asp-net/save-files-to-a-table-in-database-using-fileupload-control/


http://www.intstrings.com/ramivemula/asp-net/retrieve-files-from-a-table-in-database-using-generic-handler/
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900