Show resume database for user
I am using upload control to upload my resume (text document) to sql server 2005 database.and I can upload it from the database when I click the link button ... Its all working file ... My problem is how I can I show my complete resume to a user (how to display my resume) from my database?
+2
a source to share
2 answers
You need to set the contenttype header of the response to the correct type, and then send the file (I assume you have it as a byte array):
Response.Clear();
Response.ContentType = "application/pdf";
Response.BinaryWrite(fileBuffer);
Response.End();
You can also add a content header to let the user decide how to open the file:
// This goes after the clear and before the write
Response.AddHeader("content-disposition", string.Format("attachment; {0}", archivedFile.Name));
+1
a source to share