TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pothi Sam
NA
335
50.7k
Download Multiple binary file from database
Jan 15 2019 10:16 PM
I Have A Binary File From database. I need To download multiple file at a time
This code is help to download Single File From Database i need to download multiple file at a time
protected
void
download(
object
sender, EventArgs e)
{
con.Open();
SqlCommand cmd =
new
SqlCommand(
"select FileName, FileType, FileData from upload where Id=@id"
, con);
cmd.Parameters.AddWithValue(
"@id"
,((LinkButton)sender).CommandArgument);
SqlDataReader dr = cmd.ExecuteReader();
if
(dr.Read())
{
Response.AddHeader(
"Content-Disposition"
,
"attachment;filename=\""
+ dr[
"FileName"
] +
"\""
);
Response.BinaryWrite((
byte
[])dr[
"FileData"
]);
Response.End();
}
con.Close();
}
}
}
Reply
Answers (
1
)
Error Inserting into a postgresql database through a stored
how to create certificate for jwt