fiogf49gjkf0d sorry not fluent in code,
need to open a txt,doc,pdf or jpeg file
will know path as store in grid -but hardcided for now
tried:
string path = @"C:\\documents\\test file.txt";
byte[] byteArray = System.IO.File.ReadAllBytes(path);
Response.BinaryWrite(byteArray);
Response.ContentType = "application/octet-stream";
but get error: the message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(),response filters, HttpModules or server trace is enabled. Details:error parsing near 'this is a test file4'. |