Im new to .NET and stuck now, so i hope anyone can help my with my problem.
I have a MS SQL database where i have stored some documents as Binary data. I cant figure out how to retrieve them and show/download them in my browser.
I found some guides online and have try to put something together.
private void Write()
int id = 0;
string strID = Request.QueryString["id"];
int.TryParse(strID, out id);
var db = new ModelDataContext();
var doc = db.DocumentDatas.Where(x => x.ID == id).FirstOrDefault();
byte byteArray = File.ReadAllBytes(doc);
How do i fill the byteArray with the data?
Thanks in advance :)
View Complete Post