//Right now I'm using a test file named uploadtest1.txt to test my code. // This successfuly gets the file from the DB and into the byte array called filebyte[] file = s.getFile("uploadtest1.txt");
// This calls a method that returns the size of the file. It too is working as intended.int sz = s.fileSize("uploadtest1.txt");
// Here is where my problems start to show up.// I'll be adding more dynamic features to get the content type, but right now I just want to learn the basics of downloading a file// Therefore, I set the content type to "text/plain"// The file I'm sending down was created in Notepad// First question: Am I using the correct content type?Response.ContentType = "text/plain";// This is sending something to the browser but it does not send the file stored in the byte array named "file"// Second question: What am I doing wrong?Response.OutputStream.Write(file,0,sz);Thanks in advance for the help. czone